Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Namespaced Rack::Session, Rack::Cache, I18n and cache Redis stores for Ruby web frameworks

This branch is 183 commits behind redis-store:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks
test
.gitignore
.travis.yml
CHANGELOG
Gemfile
MIT-LICENSE
README.md
Rakefile
redis-store.gemspec

README.md

Namespaced Redis stores for Ruby frameworks

Build Status

Installation

Redis, Option 1: Homebrew

MacOS X users should use Homebrew to install Redis:

brew install redis

Redis, Option 2: From Source

Download and install Redis from http://code.google.com/p/redis/

wget http://redis.googlecode.com/files/redis-2.0.0.tar.gz
tar -zxf redis-2.0.0.tar.gz
mv redis-2.0.0 redis
cd redis
make

Install the Gem

Assuming you're using RVM or on Windows, install the gem with:

gem install redis-store

Options

You can specify the Redis configuration details using a URI or a hash. By default the gem will attempt to connect to localhost port 6379 and the db 0.

Set by URI

For example

"redis://:secret@192.168.1.100:23682/13/theplaylist"

Made up of the following:

host: 192.168.1.100
port: 23682
db: 13
namespace: theplaylist
password: secret

If you want to specify the namespace option, you have to pass the db param too.

Important: namespace is only supported for single, non-distributed stores.

Set by Hash

{ :host => 192.168.1.100, :port => 23682, :db => 13, :namespace => "theplaylist", :password => "secret" }

Important: namespace is only supported for single, non-distributed stores.

Unicorn

Use Rails.cache.reconnect in your Unicorn hooks, in order to force the client reconnection.

Running tests

TODO

If you are on Snow Leopard you have to run env ARCHFLAGS="-arch x86_64" bundle install

Copyright

(c) 2009 - 2011 Luca Guidi - http://lucaguidi.com, released under the MIT license

Something went wrong with that request. Please try again.