soneritics / cache
Caching mechanism with support for multiple caching types.
dev-master
2015-03-23 09:23 UTC
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
- satooshi/php-coveralls: dev-master
- squizlabs/php_codesniffer: dev-master
This package is auto-updated.
Last update: 2024-10-23 18:20:02 UTC
README
by
- @Soneritics - Jordi Jolink
Introduction
Caching interfaces and implementation of caching methods.
Minimum Requirements
- PHP 5.5+
Features
Currently supports the following caches:
- TextCache
- FileCache
- MemCache
- ArrayCache
- SessionCache
Example
$textCache = (new TextCache('tmp')) ->setCacheExpiration(4) ->set('test', 'test'); echo $textCache->get('test'); // sleep(5); // $textCache->has('test') === false $fileCache = (new FileCache('tmp')) ->setCacheExpiration(3600) ->set('test', ['test1', 'test2']); var_dump($fileCache->get('test')); $fileCache->clear('test');