Follow me on twitter…


Rediska Commands

You may use sfRediskaPlugin to directly use any Rediska instance.
These are only instantiated once per page load for efficiency.

Heres an example:


$rediska = sfRediska::getInstance('otherstuff');


As you can see all the Rediska commands are fully accessible this way.

Doctrine Redis driver

You can use this connection to query/result cache a Doctrine query. For example, heres what I do in my Doctrine Test table class:


public static function getById($id)
    $table = Doctrine_Core::getTable('Test');
    return $table->createQuery('t')
		 ->where(' = ?', $id)
		 ->useResultCache(true, 86400, "test_$id")



Fork me on GitHub