Cache store implementation for Rails 3 using the key value store Redis.
In the environment.rb or environments-files write:
ActionController::Base.cache_store = ActiveSupport::Cache::RailsRedisCache.new(:url => ENV['RAILS_REDIS_CACHE_URL']) ... or ... config.cache_store = ActiveSupport::Cache::RailsRedisCache.new(:url => ENV['RAILS_REDIS_CACHE_URL'])
Using the cache is simple:
@tweets = cache("tweets", :expires_in => 30.seconds){ Twitter::Search.new(...) }
Using a local Redis server for testing is simple:
brew install redis redis-server
See CHANGELOG file for further information.