bjyoungblood/bjy-cache-storage

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

Various storage adapters for Zend\Cache

dev-master 2014-08-05 14:46 UTC

This package is not auto-updated.

Last update: 2024-07-06 11:48:47 UTC


README

BjyCacheStorage

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