tlapi/bjy-cache-storage

There is no license information available for the latest version (dev-master) of this package.

Various storage adapters for Zend\Cache

dev-master 2014-02-13 11:24 UTC

This package is auto-updated.

Last update: 2024-03-29 02:33:59 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