Class: Rack::Cache::EntityStore::RedisBase

Inherits:
Rack::Cache::EntityStore show all
Extended by:
Utils
Defined in:
lib/rack/cache/redis_entitystore.rb

Direct Known Subclasses

Redis

Constant Summary

Constants inherited from Rack::Cache::EntityStore

REDIS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cacheObject (readonly)

The underlying ::Redis instance used to communicate with the Redis daemon.


9
10
11
# File 'lib/rack/cache/redis_entitystore.rb', line 9

def cache
  @cache
end

Class Method Details

.resolve(uri) ⇒ Object


18
19
20
# File 'lib/rack/cache/redis_entitystore.rb', line 18

def self.resolve(uri)
  new ::Redis::Store::Factory.resolve(uri.to_s)
end

Instance Method Details

#open(key) ⇒ Object


13
14
15
16
# File 'lib/rack/cache/redis_entitystore.rb', line 13

def open(key)
  data = read(key)
  data && [data]
end