Simple Redis Store for ActiveSupport::Cache
simple_redis_store provides a lightweight Redis cache store for ActiveSupport::Cache.
Prerequisites
simple_redis_store relies on Redis being installed and running.
Mac users can install Redis via brew install redis.
Everyone else, check the package manager of your operating system.
Installation
Add this line to your application's Gemfile then run bundle:
gem 'simple_redis_store'
Usage
Ruby on Rails
# config/environments/production.rb
config.action_controller.perform_caching = true
config.cache_store = :simple_redis_store
Standalone
ActiveSupport::Cache.lookup_store :simple_redis_store
TODO
- Implement multi key retrieval (
def read_multi) - Improve configuration support
- Tests
Copyright
(c) 2012 Kieran Pilkington, release under the MIT license