treehouselabs / cache
Library for quick and easy caching. Supports multiple drivers. [DEPRECATED]
Installs: 64 053
Dependents: 2
Suggesters: 1
Security: 0
Stars: 1
Watchers: 12
Forks: 2
Open Issues: 0
Requires
- php: >=5.5
Requires (Dev)
- doctrine/cache: ^1.1
- phpunit/phpunit: ^4.5
- predis/predis: ^1.0
Suggests
- ext-apcu: When you want to use the APCu driver
- ext-memcached: When you want to use the Memcached driver
- ext-redis: When you want to use the Redis driver
README
This package is DEPRECATED use a PSR-6 solution like https://github.com/php-cache/cache
Cache
Library for quick and easy caching. Supports multiple drivers.
Installation
composer require treehouselabs/cache:^2.0
Usage
$driver = new RedisDriver($redis); $serializer = new JsonSerializer(); $cache = new Cache($driver, $serializer); $cache->set('foo', 'bar', 60); $cache->get('foo'); $cache->has('foo'); $cache->remove('foo');