README.md in dalli-0.9.8 vs README.md in dalli-0.9.9
- old
+ new
@@ -59,21 +59,33 @@
A more comprehensive example (note that we are setting a reasonable default for maximum cache entry lifetime (one day), enabling compression for large values, and namespacing all entries for this rails app. Remove the namespace if you have multiple apps which share cached values):
config.cache_store = :dalli_store, 'cache-1.example.com', 'cache-2.example.com',
:namespace => NAME_OF_RAILS_APP, :expires_in => 1.day, :compress => true, :compress_threshold => 64.kilobytes
+In `config/initializers/session_store.rb`:
+ require 'action_dispatch/middleware/session/dalli_store'
+ Rails.application.config.session_store :dalli_store, :key => ...
+
+
Usage with Rails 2.3.x
----------------------------
In `config/environment.rb`:
config.gem 'dalli'
In `config/environments/production.rb`:
+ # Object cache
require 'active_support/cache/dalli_store23'
config.cache_store = :dalli_store
+
+In `config/initializers/session_store.rb`:
+
+ # Session cache
+ require 'action_controller/session/dalli_store'
+ ActionController::Base.session_store = :dalli_store
Usage with Passenger
------------------------