class Rack::Cache::MetaStore::Redis
Public Instance Methods
purge(key)
click to toggle source
# File lib/rack/cache/redis_metastore.rb, line 22 def purge(key) cache.del(hexdigest(key)) nil end
read(key)
click to toggle source
# File lib/rack/cache/redis_metastore.rb, line 13 def read(key) cache.get(hexdigest(key)) || [] end
write(key, entries, ttl=0)
click to toggle source
# File lib/rack/cache/redis_metastore.rb, line 17 def write(key, entries, ttl=0) ttl = ttl.to_i.zero? ? default_ttl : ttl cache.setex(hexdigest(key), ttl, entries) end