level-2/simplecache

A very simple ArrayAccess based file ache


Keywords
cache, file cache
License
BSD-2-Clause

Documentation

SimpleCache

A very simplistic file cache that uses the ArrayAcces interface

Usage

1) Include SimpleCache.php in your project

require_once 'SimpleCache\SimpleCache.php';

2) Instantiate the SimpleCache class and provide a cache directory

$cache = new \SimpleCache\SimpleCache('./tmp');

3) Use the $cache object like any array. Index names will be created as files. When you run the script again the index will still have the value you assigned it.