Module: Rack::Dedos::Cache::Redis
- Defined in:
- lib/rack/dedos/cache.rb
Instance Method Summary collapse
Instance Method Details
#get(key) ⇒ Object
54 55 56 |
# File 'lib/rack/dedos/cache.rb', line 54 def get(key) store.get(@key_prefix + key) end |
#set(key, value) ⇒ Object
50 51 52 |
# File 'lib/rack/dedos/cache.rb', line 50 def set(key, value) store.set(@key_prefix + key, value, ex: @expires_in) end |
#store ⇒ Object
46 47 48 |
# File 'lib/rack/dedos/cache.rb', line 46 def store @store ||= ::Redis.new(url: @url) end |