Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (15 sloc) 0.712 kb

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.

Jump to Line
Something went wrong with that request. Please try again.