Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rename session store

  • Loading branch information...
commit a5ad31cff960d2ee32c3b69374143520b4d2f3cb 1 parent 8b32726
@thousandsofthem thousandsofthem authored
View
2  README.md
@@ -82,7 +82,7 @@ AppName::Application.config.session_store :iron_cache_store
Alternatively, you can supply project_id and token in code.
```ruby
-AppName::Application.config.session_store :iron_cache_store,
+AppName::Application.config.session_store :iron_cache,
project_id: 'XXX',
token: 'YYY',
namespace: 'other-cache-name',
View
4 lib/action_dispatch/session/iron_cache_store.rb → lib/action_dispatch/session/iron_cache.rb
@@ -4,13 +4,13 @@
module ActionDispatch
module Session
- class IronCacheStore < ActionDispatch::Session::AbstractStore
+ class IronCache < ActionDispatch::Session::AbstractStore
def initialize(app, options = {})
@options = options
super
- @client = IronCache::Client.new(options)
+ @client = ::IronCache::Client.new(options)
end
def options
View
6 lib/iron_cache.rb
@@ -3,4 +3,8 @@
require_relative 'iron_cache/caches'
require_relative 'iron_cache/items'
require_relative 'iron_cache/client'
-require_relative 'action_dispatch/session/iron_cache_store'
+
+# session store
+if defined? ActionDispatch
+ require_relative 'action_dispatch/session/iron_cache'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.