Class: Rack::Session::RufusTyrant
- Inherits:
-
Abstract::ID
- Object
- Abstract::ID
- Rack::Session::RufusTyrant
- Defined in:
- lib/rack/session/rufus_tyrant.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
Abstract::ID::DEFAULT_OPTIONS.merge :tyrant_server => "localhost:1978"
Instance Attribute Summary collapse
-
#mutex ⇒ Object
readonly
Returns the value of attribute mutex.
-
#pool ⇒ Object
readonly
Returns the value of attribute pool.
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ RufusTyrant
constructor
A new instance of RufusTyrant.
Constructor Details
#initialize(app, options = {}) ⇒ RufusTyrant
Returns a new instance of RufusTyrant.
9 10 11 12 13 14 15 16 17 |
# File 'lib/rack/session/rufus_tyrant.rb', line 9 def initialize(app, = {}) super @mutex = Mutex.new @host, @port = *([:tyrant_server] || @default_options[:tyrant_server]).split(":") # @default_options) #options[:cache] || # connecting & closing on each get and put # not sure if this is the best option, but otherwise it'll keep # opening connections until tyrant freezes... =/ tokyo_connect end |
Instance Attribute Details
#mutex ⇒ Object (readonly)
Returns the value of attribute mutex.
6 7 8 |
# File 'lib/rack/session/rufus_tyrant.rb', line 6 def mutex @mutex end |
#pool ⇒ Object (readonly)
Returns the value of attribute pool.
6 7 8 |
# File 'lib/rack/session/rufus_tyrant.rb', line 6 def pool @pool end |