cwreden/silex-stash-service

The stash cache service for silex.

dev-master 2014-08-04 09:29 UTC

README

The stash cache service for silex.

Services

  • stash => StashService
  • stash.cache => Default Pool
  • stash.caches => Pimple with all registered Pool classes

Register a new cache pool on runtime

You can register a new cache by using the 'stash.cache.register'-function.


$app['stash.cache.register']('myNewCachePool', array(
    'driver' => 'apc'
));

Possible drivers

  • memory
  • file_system
  • redis
  • sqlite
  • apc

Options


array(
    'driver' => 'apc',            // use the driver oder driverClass option
    'driverClass' => 'My\Driver',
    'poolClass' => 'My\Pool',
    'itemClass' => 'My\Item',
    'loggerClass' => 'My\PSR\Logger'
    ...                           // all stash known options
);

Links