This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Jun 11 02:30:23 -0700 2009 | |
| |
MIT-LICENSE | Sat Apr 11 03:54:41 -0700 2009 | |
| |
README.textile | Tue Jun 23 08:10:39 -0700 2009 | |
| |
Rakefile | Thu Jun 18 03:11:57 -0700 2009 | |
| |
lib/ | Mon Aug 31 14:56:39 -0700 2009 | |
| |
redis-store.gemspec | Thu Jun 18 03:11:57 -0700 2009 | |
| |
spec/ | Thu Jun 18 03:06:35 -0700 2009 |
README.textile
Rack::Session, Rack::Cache and cache Redis stores for Ruby web frameworks
Installation
Download and install Redis from http://code.google.com/p/redis/
curl -OL http://redis.googlecode.com/files/redis-0.900_2.tar.gz tar -zxvf redis-0.900_2.tar.gz mv redis-0.900_2 redis cd redis makeInstall the gems
sudo gem install ezmobius-redis-rb -s http://gems.github.com sudo gem install jodosha-redis-store -s http://gems.github.comCache store
Provides a cache store for your Ruby web framework of choice.
How to use with Rails
config.gem “jodosha-redis-store”, :source => “http://gems.github.com”, :lib => “redis-store” require “redis-store” config.cache_store = :redis_storeHow to use with Merb
dependency “jodosha-redis-store”, “0.3.6” dependency(“merb-cache”, merb_gems_version) do Merb::Cache.setup do register(:redis, Merb::Cache::RedisStore, :servers => [“127.0.0.1:6379”]) end endHow to use with Sinatra
require ‘rubygems’ require ‘sinatra’ require ‘jodosha-redis-store’ class MyApp < Sinatra::Base register Sinatra::Cache get ‘/hi’ do cache.fetch(“greet”) { “Hello, World!” } end endRack::Session
Provides a Redis store for Rack::Session. See http://rack.rubyforge.org/doc/Rack/Session.html
How to use with a generic Rack application
require “rubygems” require “rack” require “jodosha-redis-store” require “application” use Rack::Session::Redis run Application.newHow to use with Rails
config.gem “jodosha-redis-store”, :source => “http://gems.github.com”, :lib => “redis-store” ActionController::Base.session_store = Rack::Session::RedisHow to use with Merb
dependency “jodosha-redis-store”, “0.3.6” Merb::Config.use do |c| c[:session_store] = ‘redis’ end Merb::BootLoader.before_app_loads do Merb::SessionContainer.subclasses << “Merb::RedisSession” endHow to use with Sinatra
Sorry, but Sinatra application boot system hardcode Rack::Session::Cookie
Rack::Cache
Provides a Redis store for HTTP caching. See http://github.com/rtomayko/rack-cache
require “rubygems” require “rack” require “rack/cache” require “jodosha-redis-store” require “application” use Rack::Cache, :metastore => ‘redis://localhost:6379/0’, :entitystore => ‘redis://localhost:6380/1’ run Application.newCopyright
© 2009 Luca Guidi – http://lucaguidi.com, released under the MIT license







