Class: Rack::Cache::MetaStore::RedisBase

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

Direct Known Subclasses

Redis

Constant Summary

Constants inherited from Rack::Cache::MetaStore

REDIS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#cacheObject (readonly)

The ::MarshaledRedis object used to communicate with the Redis daemon.



8
9
10
# File 'lib/rack/cache/redis_metastore.rb', line 8

def cache
  @cache
end

Class Method Details

.resolve(uri) ⇒ Object



10
11
12
13
14
15
# File 'lib/rack/cache/redis_metastore.rb', line 10

def self.resolve(uri)
  db = uri.path.sub(/^\//, '')
  db = "0" if db.empty?
  server = { :host => uri.host, :port => uri.port || "6379", :db => db }
  new server
end