https://github.com/aurimasniekis/epwt-cache
EPWT Cache Bundle for Symfony
https://github.com/aurimasniekis/epwt-cache
Last synced: about 2 months ago
JSON representation
EPWT Cache Bundle for Symfony
- Host: GitHub
- URL: https://github.com/aurimasniekis/epwt-cache
- Owner: aurimasniekis
- License: mit
- Created: 2015-04-22T16:41:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-06T13:55:55.000Z (about 9 years ago)
- Last Synced: 2025-03-30T07:31:57.328Z (2 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
EPWT Cache
==========
[](https://packagist.org/packages/epwt/cache) [](https://packagist.org/packages/epwt/cache) [](https://packagist.org/packages/epwt/cache) [](https://packagist.org/packages/epwt/cache)
[](https://github.com/igrigorik/ga-beacon)[](https://insight.sensiolabs.com/projects/736ce78f-ddec-4742-a475-c9a8725eaed0)
This library provides PSR-6 based caching.
## Requirements
* PHP >= 5.4
## Currently Implemented Drivers
* Redis (predis & phpredis supported)
Usage
-------```php
$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](https://github.com/gcds).
Reporting an issue or a feature request
---------------------------------------Issues and feature requests are tracked in the [Github issue tracker](https://github.com/gcds/epwt-cache/issues).