sfRedisCachePlugin - 1.0.0
Cache backend for Redis key/value database
You are currently browsing
the website for symfony 1
Redis is a high performance cache backend, much better than Memcached and even APC. Use this advantage for with the sfRedisCache class in your factories.
Redis is a high performance cache backend, much better than Memcached and even APC. Use this advantage for with the
sfRedisCache class in your factories.
|Thomas Parisot||lead||ten.mot-elcno <<ta>> samoht|
Copyright (c) 2009 Thomas Parisot
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
Redis is key/value persistent database. It's faster than APC, distributed like Memcache and most of all, it's not volatile. On server restart, or shutdown, data will remain and even better, the lifetime of cached data is still calculated.
This plugin intends to make Redis server usable as a cache backend method for your factories, or directly, within your code.
Notice: despite the cache backend accepts a compiled Redis class, it requires to have at least the
see LICENSE file
You need to have at least a decent Redis PHP class supporting those methods: * connect * delete * exists * expire * get * keys * mget * ping * set
So far, it has been unit-tested with the debian package
You can find out some other âˆ’ yet unsupported âˆ’ libraries:
* phpredis (initial compiled library)
* phpredis fork (improved compiled library)
You can install easily the plugin through symfony CLI: symfony plugin:install sfRedisCachePlugin
Or through SVN repository by adding the following svn:external: sfRedisCachePlugin http://svn.symfony-project.com/plugins/sfRedisCachePlugin/trunk/
Notice: the trunk will one day branched if any compatibility issues appears.
The main purpose of sfRedisCachePlugin is to use it as a cache backend for your factories.yml. For example:
view_cache: class: sfRedisCachePlugin param: host: 127.0.0.1 mode: shared port: 6379 prefix: %SF_APP_DIR%/template
As the class extends sfCache class, it follows the same usage.
The class accepts some option parameters: * class': the Redis class we try to load (default to Redis) * mode: Defines if we work with the "compiled" (faster) or "shared" (easier) library (default to "shared") * host: The default server (default to 127.0.0.1) * port: The default port (default to 6379) * redis: a redis object (not mandatory)