README.md in redis-session-store-0.7.0 vs README.md in redis-session-store-0.8.0

- old
+ new

@@ -16,16 +16,16 @@ see fit. This library doesn't offer anything related to caching, and is only suitable for Rails applications. For other frameworks or drop-in support for caching, check out -[redis-store](http://github.com/jodosha/redis-store/) +[redis-store](http://github.com/jodosha/redis-store/). Installation ------------ -For Rails 3+, adding this to your Gemfile will do the trick. +For Rails 3+, adding this to your `Gemfile` will do the trick. ``` ruby gem 'redis-session-store' ``` @@ -55,10 +55,13 @@ ``` ruby My::Application.config.session_store :redis_session_store, { # ... other options ... on_redis_down: ->(e, env, sid) { do_something_will_ya!(e) } + redis: { + # ... redis options ... + } } ``` ### Serializer @@ -72,15 +75,18 @@ ``` ruby My::Application.config.session_store :redis_session_store, { # ... other options ... serializer: :hybrid + redis: { + # ... redis options ... + } } ``` **Note**: Rails 4 is required for using the `:json` and `:hybrid` serializers -because the `Flash` object doesn't serializer well in 3.2. See [Rails #13945](https://github.com/rails/rails/pull/13945) for more info. +because the `Flash` object doesn't serialize well in 3.2. See [Rails #13945](https://github.com/rails/rails/pull/13945) for more info. ### Session load error handling If you want to handle cases where the session data cannot be loaded, a custom callable handler may be provided as `on_session_load_error` which @@ -88,9 +94,12 @@ ``` ruby My::Application.config.session_store :redis_session_store, { # ... other options ... on_session_load_error: ->(e, sid) { do_something_will_ya!(e) } + redis: { + # ... redis options ... + } } ``` **Note** The session will *always* be destroyed when it cannot be loaded.