diff options
author | kakysha <ezhikvdele@gmail.com> | 2013-10-28 21:01:08 +0100 |
---|---|---|
committer | kakysha <ezhikvdele@gmail.com> | 2013-10-28 21:01:08 +0100 |
commit | c6fc0c8a4e3e3909b305e3fc24d898a3563d82a8 (patch) | |
tree | 64d703e8a94c93923e7d3735a8ab843c1df0854e /user_guide_src | |
parent | ffe2130b00bffb2f43debf82c34586642c831b0b (diff) |
Update Redis Caching block
Added config options
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/libraries/caching.rst | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst index 8d7b4c440..10d0e84d7 100644 --- a/user_guide_src/source/libraries/caching.rst +++ b/user_guide_src/source/libraries/caching.rst @@ -239,21 +239,32 @@ For more information on WinCache, please see Redis Caching ============= +Redis is an in-memory key-value store which can operate in LRU cache mode. +To use it, you need Redis server and any Redis PHP extension, e.g. this one +`https://github.com/nicolasff/phpredis <https://github.com/nicolasff/phpredis>`_. + +Config options to connect to redis server must be stored in the application/config/redis.php file. +Available options are:: + + $config['socket_type'] = 'tcp'; //`tcp` or `unix` + $config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type + $config['host'] = '127.0.0.1'; + $config['password'] = NULL; + $config['port'] = 6379; + $config['timeout'] = 0; + All of the methods listed above can be accessed without passing a specific adapter to the driver loader as follows:: $this->load->driver('cache'); $this->cache->redis->save('foo', 'bar', 10); -.. important:: Redis may require one or more of the following options: - **host**, **post**, **timeout**, **password**. - -The Redis PHP extension repository is located at -`https://github.com/nicolasff/phpredis <https://github.com/nicolasff/phpredis>`_. +For more information on Redis, please see +`http://redis.io <http://redis.io>`_. Dummy Cache =========== This is a caching backend that will always 'miss.' It stores no data, but lets you keep your caching code in place in environments that don't -support your chosen cache.
\ No newline at end of file +support your chosen cache. |