epwt/cache

This package is abandoned and no longer maintained. No replacement package was suggested.

EPWT PSR-6 Cache Implementation

1.0.0 2015-04-27 22:10 UTC

This package is auto-updated.

Last update: 2021-01-17 09:20:30 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Analytics

SensioLabsInsight

This library provides PSR-6 based caching.

Requirements

  • PHP >= 5.4

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:

LICENSE

About

EPWT Cache is brought to you by Aurimas Niekis.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.