Class: Redis::PooledStore

Inherits:
Pooled
  • Object
show all
Includes:
Store::Interface, Store::Ttl
Defined in:
lib/redis/pooled_store.rb

Instance Attribute Summary

Attributes included from Pools::Pooled

#connection_pool, #preparation_chain

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pooled

#__connection, #__disconnect

Methods included from Pools::Pooled

#__connection, #__disconnect, #__prepare, #with_connection

Constructor Details

#initialize(options = { }) ⇒ PooledStore

Returns a new instance of PooledStore.



8
9
10
11
# File 'lib/redis/pooled_store.rb', line 8

def initialize(options = { })
  super
  _extend_marshalling options
end

Class Method Details

.rails3?Boolean

:nodoc:

Returns:

  • (Boolean)


13
14
15
# File 'lib/redis/pooled_store.rb', line 13

def self.rails3? #:nodoc:
  defined?(::Rails) && ::Rails::VERSION::MAJOR == 3
end

Instance Method Details

#to_sObject



17
18
19
20
21
# File 'lib/redis/pooled_store.rb', line 17

def to_s
  with_connection do |c|
    "Redis::Pooled => #{c.host}:#{c.port} against DB #{c.db}"
  end
end