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-12-23 18:42:22 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');