Class: Redis::Store

Inherits:
Redis
  • Object
show all
Includes:
Interface, RedisVersion, Ttl
Defined in:
lib/redis-store.rb,
lib/redis/store.rb,
lib/redis/store/ttl.rb,
lib/redis/store/factory.rb,
lib/redis/store/version.rb,
lib/redis/store/interface.rb,
lib/redis/store/namespace.rb,
lib/redis/store/marshalling.rb,
lib/redis/store/redis_version.rb

Defined Under Namespace

Modules: Interface, Marshalling, Namespace, RedisVersion, Ttl Classes: Factory

Constant Summary collapse

VERSION =
'1.3.0'

Instance Method Summary collapse

Methods included from Ttl

#set, #setnx

Methods included from Interface

#get, #set, #setex, #setnx

Methods included from RedisVersion

#redis_version, #supports_redis_version?

Constructor Details

#initialize(options = { }) ⇒ Store

Returns a new instance of Store.



9
10
11
12
13
# File 'lib/redis/store.rb', line 9

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

Instance Method Details

#reconnectObject



15
16
17
# File 'lib/redis/store.rb', line 15

def reconnect
  @client.reconnect
end

#to_sObject



19
20
21
22
# File 'lib/redis/store.rb', line 19

def to_s
  h = @client.host
  "Redis Client connected to #{/:/ =~ h ? '['+h+']' : h}:#{@client.port} against DB #{@client.db}"
end