RedisCache/README.md

44 lines
1.3 KiB
Markdown

# Redis Cache Plugin for PostActiv
## About
WARNING: THIS IS ALPHA CODE, IT IS PRERELEASE AND SHOULD ONLY BE INSTALLED TO
HELP TEST OR YOU ARE WILLING TO TAKE RISKS.
Caches database objects in Redis. Functions almost identically to the Memcached
plugin for GNU Social except that it uses Redis. The code is derived from that
plugin.
It might work with GNU Social also. Try it and tell me.
## Install
Install phpredis package either through your distribution package manager or
PECL or compile it.
- Move the project directory to ${POSTACTIV}/plugins
- Add to your config.php: addPlugin('RedisCache');
By default it will use localhost and the standard Redis port to connect. You
can also pass a named parameter array to the plugin with "host" and "port"
values to explicitly set this, or only set "host" to a named pipe.
Example: addPlugin('RedisCache', array('host' => '10.0.0.1', port => 1679));
It namespaces its keys using the site shortname, so it should properly
separate caches in a multisite configuration unless you did something stupid
like set multiple sites with the same shortname.
## Usage
You don't have to do anything, it will just start caching stuff that goes
through the managed dboject system and hopefully make your site faster.
## License
GNU Affero License
## Thanks
Evan Prodromou and Craig Andrews, authors of the original Memcached plugin.