Home

Awesome

Eventcache is a PHP class for caching that:

On the I held a presentation on Eventcache during the 2nd CakePHP borrel in Utrecht. It explains what Eventcache does and how you can implement it.

Setup

require_once APP . DS . 'vendors' . DS . 'eventcache' . DS . 'EventCache.php';
EventCache::setOption(array(
    'disable' => false, // Disable/Enable eventcache globally
    'adapter' => 'EventCacheAdapterRedis',
    'servers' => array(
        array(
            'host' => '10.0.0.135',
            'port' => 6379,
        ),
    ),
));

Most Basic Example

EventCache::write('name', 'Kevin');
$val = EventCache::read('name');