library cache
EPWT PSR-6 Cache Implementation
epwt/cache
EPWT PSR-6 Cache Implementation
- Friday, May 6, 2016
- by gcds
- Repository
- 1 Watchers
- 6 Stars
- 510 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 1 Forks
- 1 Open issues
- 2 Versions
- 5 % Grown
EPWT Cache
, (*1)
, (*2)
This library provides PSR-6 based caching., (*3)
Requirements
Currently Implemented Drivers
- Redis (predis & phpredis supported)
Usage
$redisDriver = new EPWT\Cache\Drivers\RedisDriver();
$redis = new Redis();
$redis->connect('127.0.0.1');
$redisDriver->setRedis($redis);
$demoCachePool = new EPWT\Cache\Core\CacheItemPool('demo_pool');
$demoCachePool->setDriver($redisDriver);
$alternativeCachePool = new EPWT\Cache\Core\CacheItemPool('alternative_pool');
$alternativeCachePool->setDriver($redisDriver);
$cacheItemA = new EPWT\Cache\Core\CacheItem('a');
$cacheItemA->setCacheItemPool($demoCachePool);
$cacheItemA->set('foobar');
$demoCachePool->save($cacheItemA);
$a = $demoCachePool->getItem('a');
$a->get();
$alternativeCachePool->save($a);
License
This bundle is under the MIT license. See the complete license in the file:, (*4)
LICENSE
About
EPWT Cache is brought to you by Aurimas Niekis., (*5)
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker., (*6)