class RailsWebCache::RedisCacheStore

Public Instance Methods

entry(key, options = {}) click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 22
def entry(key, options = {})
  return unless key
  return unless type(key) == 'string'
  entry = read_entry(key, options)
  return unless entry
  RailsWebCache::Entry.new(entry)
end
keys() click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 9
def keys
  redis.keys
end
keys_size() click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 5
def keys_size
  redis.dbsize
end
read(key) click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 13
def read(key)
  return unless type(key) == 'string'
  cache.read(key) if key
end

Private Instance Methods

redis() click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 32
def redis
  @redis ||= cache.redis
end
type(key) click to toggle source
# File lib/rails_web_cache/redis_cache_store.rb, line 36
def type(key)
  redis.type(key)
end