PHPackages                             tiagogouvea/simple-php-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. tiagogouvea/simple-php-cache

ActiveLibrary[Caching](/categories/caching)

tiagogouvea/simple-php-cache
============================

Simple PHP Cache class using file system

49PHP

Since Aug 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/TiagoGouvea/Simple-PHP-Cache)[ Packagist](https://packagist.org/packages/tiagogouvea/simple-php-cache)[ RSS](/packages/tiagogouvea-simple-php-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple PHP Cache
================

[](#simple-php-cache)

Forked from [cosenary/Simple-PHP-Cache](https://github.com/cosenary/Simple-PHP-Cache)

About
-----

[](#about)

A light, simple but powerful PHP5 Cache Class which uses the filesystem for caching.

Requirements
------------

[](#requirements)

- PHP 5.2.x or higher

Introduction
------------

[](#introduction)

Basically the caching class stores its data in files in the JSON format. These files will be created if you store data under a Cache name.

If you set a new Cache name with `setCache()`, a new cache file will be generated. The Cache will store all further data in the new file. The Setter method allows you to switch between the different Cache files.

Quick Start
-----------

[](#quick-start)

Add to your composer.json:

{ "require": { "tiagogougea/simple-php-cache": "\*" } }

And run "composer update" or just run "composer require tiagogouvea/simple-php-cache".

### Setup Cache class

[](#setup-cache-class)

It's not much trouble to setup the Cache.
First create a writable directory `cache/` and include the Cache class:

```

```

Now we've setup the Cache instance and can start caching!

```
