Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: redis-store/redis-store
base: d5cfa27374
...
head fork: redis-store/redis-store
compare: dd8d211ebe
  • 2 commits
  • 9 files changed
  • 0 commit comments
  • 2 contributors
Commits on Dec 12, 2012
Matthew Beale mixonic Clean up README files to be more clear and helpful 7ea89db
Commits on Jan 18, 2013
Luca Guidi jodosha Merge pull request #158 from mixonic/documentation
Clean up README files to be more clear and helpful
dd8d211
18 README.md
View
@@ -1,8 +1,10 @@
+[![Build Status](https://secure.travis-ci.org/jodosha/redis-store.png?branch=master)](http://travis-ci.org/jodosha/redis-store?branch=master) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/jodosha/redis-store)
+
# Redis stores for Ruby frameworks
-__Redis Store__ provides a full set of stores (*Cache*, *I18n*, *Session*, *HTTP Cache*) for all the modern Ruby frameworks like: __Ruby on Rails__, __Sinatra__, __Rack__, __Rack::Cache__ and __I18n__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__Redis Store__ provides a full set of stores (*Cache*, *I18n*, *Session*, *HTTP Cache*) for modern Ruby frameworks like: __Ruby on Rails__, __Sinatra__, __Rack__, __Rack::Cache__ and __I18n__. It supports object marshalling, timeouts, single or multiple nodes, and namespaces.
-Please check the *README* file of each gem, to be informed about the usage.
+Please check the *README* file of each gem for usage and installation guidelines.
## Redis Installation
@@ -16,22 +18,18 @@ MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install
Download and install Redis from [http://redis.io](http://redis.io/)
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
+ wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
tar -zxf redis-2.4.15.tar.gz
mv redis-2.4.15 redis
cd redis
make
-## Code
-
-[![Build Status](https://secure.travis-ci.org/jodosha/redis-store.png?branch=master)](http://travis-ci.org/jodosha/redis-store?branch=master) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/jodosha/redis-store)
-
## Running tests
git clone git://github.com/jodosha/redis-store.git
- cd redis-store
- gem install bundler
- ruby ci/run.rb
+ cd redis-store
+ gem install bundler
+ ruby ci/run.rb
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" ruby ci/run.rb`
55 redis-actionpack/README.md
View
@@ -1,60 +1,25 @@
# Redis stores for ActionPack
-__`redis-actionpack`__ provides a full set of stores (*Session*, *HTTP Cache*) for __ActionPack__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-actionpack`__ provides a session store for __ActionPack__, specifically for __ActionDispatch__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-actionpack'
-
-### Session Store: Ruby on Rails
-
- # config/initializers/session_store.rb
- MyApplication::Application.config.session_store :redis_store
-
-### Session Store: Standalone
-
- ActionController::Base.cache_store = ActionDispatch::Session::RedisSessionStore.new
-
-### HTTP Cache
-
- # config.ru
- require 'rack'
- require 'rack/cache'
- require 'redis-rack-cache'
+ gem 'redis-actionpack'
- use Rack::Cache,
- :metastore => 'redis://localhost:6379/0/metastore',
- :entitystore => 'redis://localhost:6380/0/entitystore'
+### Usage
-#### Configuration
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead. For standalone usage:
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ ActionController::Base.cache_store = ActionDispatch::Session::RedisSessionStore.new
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-actionpack
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-actionpack
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
44 redis-activesupport/README.md
View
@@ -1,49 +1,25 @@
# Redis stores for ActiveSupport
-__`redis-activesupport`__ provides a full set of stores (*Cache*) for __ActiveSupport__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-activesupport`__ provides a cache for __ActiveSupport__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-activesupport'
-
-### Cache Store: Ruby on Rails
-
- # config/environments/production.rb
- config.cache_store = :redis_store # { ... optional configuration ... }
-
-### Cache Store: Standalone
+ gem 'redis-activesupport'
- ActiveSupport::Cache.lookup_store :redis_store # { ... optional configuration ... }
+### Usage
-#### Configuration
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead. For standalone usage:
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ ActiveSupport::Cache.lookup_store :redis_store # { ... optional configuration ... }
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-activesupport
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-activesupport
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
39 redis-i18n/README.md
View
@@ -1,44 +1,25 @@
# Redis stores for I18n
-__`redis-i18n`__ provides a Redis backend for __I18n__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-i18n`__ provides a Redis backend for __I18n__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-i18n'
-
-### Backend:
+ gem 'redis-i18n'
- I18n.backend = I18n::Backend::Redis.new
+### Usage
-#### Configuration
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead. For standalone usage:
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ I18n.backend = I18n::Backend::Redis.new
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-i18n
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-i18n
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
51 redis-rack-cache/README.md
View
@@ -1,51 +1,32 @@
# Redis stores for Rack::Cache
-__`redis-rack-cache`__ provides a Redis backed store for __Rack::Cache__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-rack-cache`__ provides a Redis backed store for __Rack::Cache__, an HTTP cache. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-rack-cache'
+ gem 'redis-rack-cache'
-### HTTP Cache Store:
+### Usage
- # config.ru
- require 'rack'
- require 'rack/cache'
- require 'redis-rack-cache'
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead. For standalone usage:
- use Rack::Cache,
- :metastore => 'redis://localhost:6379/0/metastore',
- :entitystore => 'redis://localhost:6380/0/entitystore'
-
-#### Configuration
+ # config.ru
+ require 'rack'
+ require 'rack/cache'
+ require 'redis-rack-cache'
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ use Rack::Cache,
+ metastore: 'redis://localhost:6379/0/metastore',
+ entitystore: 'redis://localhost:6380/0/entitystore'
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-rack-cache
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-rack-cache
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
45 redis-rack/README.md
View
@@ -1,48 +1,29 @@
# Redis stores for Rack
-__`redis-rack`__ provides a Redis backed session store __Rack__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-rack`__ provides a Redis backed session store __Rack__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-rack'
+ gem 'redis-rack'
-### Session Store:
+### Usage
- # config.ru
- require 'rack'
- require 'rack/session/redis'
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead. For standalone usage:
- use Rack::Session::Redis
-
-#### Configuration
+ # config.ru
+ require 'rack'
+ require 'rack/session/redis'
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ use Rack::Session::Redis
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-rack
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-rack
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
65 redis-rails/README.md
View
@@ -1,64 +1,39 @@
# Redis stores for Ruby on Rails
-__`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache*) for __Ruby on Rails__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache*) for __Ruby on Rails__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-rails'
+ gem 'redis-rails' # Will install several other redis- gems
-### Cache Store:
+### Usage
- # config/environments/production.rb
- config.cache_store = :redis_store # { ... optional configuration ... }
- # config.cache_store = :redis_store, 'redis://localhost:6379/'
- # config.cache_store = :redis_store, 'redis://localhost:6379/0' # database 0
- # config.cache_store = :redis_store, 'redis://localhost:6379/0/cache' # database: 0, namespace: cache
-
-### Session Store:
-
- # config/initializers/session_store.rb
- MyApplication::Application.config.session_store :redis_store
+For Rails 3.2:
-### HTTP Cache
+ # config/application.rb
+ config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }
- # config.ru
- require 'rack'
- require 'rack/cache'
- require 'redis-rack-cache'
+Configuration values at the end are optional. If you want to use Redis as a backend for sessions, you will also need to set:
- use Rack::Cache,
- :metastore => 'redis://localhost:6379/0/metastore',
- :entitystore => 'redis://localhost:6380/0/entitystore'
+ # config/initializers/session_store.rb
+ MyApplication::Application.config.session_store :redis_store
-#### Configuration
+And if you would like to use Redis as a rack-cache backend for HTTP caching:
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
+ # config/environments/production.rb
+ config.action_dispatch.rack_cache = {
+ metastore: "redis://localhost:6379/1/metastore",
+ entitystore: "redis://localhost:6379/1/entitystore"
+ }
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-rails
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-rails
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
53 redis-sinatra/README.md
View
@@ -1,54 +1,33 @@
# Redis stores for Sinatra
-__`redis-sinatra`__ provides a Redis backed cache store for __Sinatra__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
+__`redis-sinatra`__ provides a Redis backed cache store for __Sinatra__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
-
-## Usage
+## Installation
# Gemfile
- gem 'redis-sinatra'
+ gem 'redis-sinatra'
-### Cache Store:
+### Usage
- require 'sinatra'
- require 'redis-sinatra'
+ require 'sinatra'
+ require 'redis-sinatra'
- class MyApp < Sinatra::Base
- register Sinatra::Cache
- get "/hi" do
- settings.cache.fetch("greet") { "Hello, World!" }
- end
- end
+ class MyApp < Sinatra::Base
+ register Sinatra::Cache
+ get "/hi" do
+ settings.cache.fetch("greet") { "Hello, World!" }
+ end
+ end
Keep in mind that the above fetch will return `"OK"` on success, not the return of the block.
-#### Configuration
-
-For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
-
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-sinatra
- gem install bundler
- bundle exec rake
+ cd redis-store/redis-sinatra
+ bundle install
+ bundle exec rake
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
26 redis-store/README.md
View
@@ -2,32 +2,16 @@
__Redis Store__ provides a full set of stores (*Cache*, *I18n*, *Session*, *HTTP Cache*) for all the modern Ruby frameworks like: __Ruby on Rails__, __Sinatra__, __Rack__, __Rack::Cache__ and __I18n__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
-This is the core for all the other gems, please check the *READMEs* to be informed about the usage.
+See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
-## Redis Installation
-
-### Option 1: Homebrew
-
-MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
-
- brew install redis
-
-### Option 2: From Source
-
-Download and install Redis from [http://redis.io](http://redis.io/)
-
- wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
- tar -zxf redis-2.4.15.tar.gz
- mv redis-2.4.15 redis
- cd redis
- make
+If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/jodosha/redis-store/tree/master/redis-rails) instead.
## Running tests
+ gem install bundler
git clone git://github.com/jodosha/redis-store.git
- cd redis-store/redis-store
- gem install bundler
- ruby ci/run.rb
+ cd redis-store/redis-store
+ ruby ci/run.rb
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" ruby ci/run.rb`

No commit comments for this range

Something went wrong with that request. Please try again.