Class: ActionDispatch::Session::AerospikeStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- ActionDispatch::Session::AerospikeStore
- Defined in:
- lib/action_dispatch/middleware/session/aerospike_store.rb
Constant Summary collapse
- AEROSPIKE_DEFAULT_OPTIONS =
{ :host => '127.0.0.1', :port => 3000, :ns => 'test', :set => 'session', :bin => 'data' }
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ AerospikeStore
constructor
A new instance of AerospikeStore.
Constructor Details
#initialize(app, options = {}) ⇒ AerospikeStore
Returns a new instance of AerospikeStore.
17 18 19 20 21 22 |
# File 'lib/action_dispatch/middleware/session/aerospike_store.rb', line 17 def initialize(app, = {}) .merge!(self.class::AEROSPIKE_DEFAULT_OPTIONS) { |key, v1| v1 } @client = .delete(:client) || Aerospike::Client.new(Aerospike::Host.new(.delete(:host), .delete(:port))) super end |