From 488914a4acfa3470a2c5895469c02998db004faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Osman=20U=CC=88ngu=CC=88r?= Date: Thu, 19 Apr 2012 11:33:26 +0300 Subject: [PATCH] Added section about cache driver --- en/reference/caching.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/en/reference/caching.rst b/en/reference/caching.rst index 1da48f2ee..52545d842 100644 --- a/en/reference/caching.rst +++ b/en/reference/caching.rst @@ -100,6 +100,28 @@ driver by itself. $cacheDriver = new \Doctrine\Common\Cache\XcacheCache(); $cacheDriver->save('cache_id', 'my_data'); +Redis +~~~~~ + +In order to use the Redis cache driver you must have it compiled +and enabled in your php.ini. You can read about what is Redis +`from here `_. Also check +`here `_ for how you can use +and install Redis PHP extension. + +Below is a simple example of how you could use the Redis cache +driver by itself. + +.. code-block:: php + + connect('redis_host', 6379); + + $cacheDriver = new \Doctrine\Common\Cache\RedisCache(); + $cacheDriver->setRedis($redis); + $cacheDriver->save('cache_id', 'my_data'); + Using Cache Drivers -------------------