A simple cache library for php. It implement both a file and a memory (APCu) cache back-ends.
As simple as :
composer require sanzodown/simple-php-cache
Both come with default configuration so if you don't bother, use it.
$cache = new FileCache(
'your/cache/path',
'youNameFile'
);
Note that you must have the extension APCu enabled.
$cache = new ApcCache(
3600, // Time to live
);
$cache->set('key', 'Your datas');
$cache->get('test'); // Your datas