🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

rails_redis_cache

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rails_redis_cache

0.2.0
Rubygems
Version published
Maintainers
1
Created
Source

== About

Status: http://stillmaintained.com/phoet/rails_redis_cache.png Build: http://travis-ci.org/phoet/rails_redis_cache.png

Cache store implementation for Rails 3.1 using the key value store Redis[http://code.google.com/p/redis].

If you are looking for Rails 3 implementation please have a look at latest stable release version 0.0.4.

== Usage

In the environment.rb or environments-files write:

ActionController::Base.cache_store = ActiveSupport::Cache::RailsRedisCacheStore.new(:url => ENV['RAILS_REDIS_CACHE_URL'])

... or ...

config.cache_store = ActiveSupport::Cache::RailsRedisCacheStore.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.

== License

See LICENSE file for further information.

FAQs

Package last updated on 14 Dec 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts