tlapi / bjy-cache-storage
Various storage adapters for Zend\Cache
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 8
pkg:composer/tlapi/bjy-cache-storage
Requires
- php: >=5.3.3
- predis/predis: dev-master
- zendframework/zendframework: 2.3.*
This package is auto-updated.
Last update: 2025-09-29 01:24:21 UTC
README
Provides cache storage adapters for backends not supplied by Zend\Cache.
Adapters
- Redis (requires Predis >= v0.7)
- ZendDb (using most RDBMS platforms)
Usage
$objectProxy = PatternFactory::factory('object', array( 'object' => $object, 'storage' => 'redis' ));
Or for more options:
$objectProxy = PatternFactory::factory('object', array( 'object' => $object, 'storage' => array( 'adapter' => array( 'name' => 'zenddb', 'options' => array( 'adapter' => new Zend\Db\Adapter\Adapter, 'tablename' => 'cache', 'keyfield' => 'key', 'valuefield' => 'value' ), ), ), );
Configuration
For configuration options for Redis, please check the readme for the Predis library
All configuration options for Zend\Db are shown in the example above