Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
rails cache store implementation with redis
Branch: master
Pull request Compare This branch is 13 commits behind phoet:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
.rvmrc
CHANGELOG
Gemfile
Gemfile.lock
README.rdoc
rails_redis_cache.gemspec
rakefile.rb

README.rdoc

About

Cache store implementation for Rails 3 using the key value store Redis.

Usage

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(...) }

Installing Redis with homebrew

Using a local Redis server for testing is simple:

brew install redis
redis-server

Changelog

See CHANGELOG file for further information.

Something went wrong with that request. Please try again.