Method: Dalli::Client#touch
- Defined in:
- lib/dalli/client.rb
#touch(key, ttl = nil) ⇒ Object
Touch updates expiration time for a given key.
Returns true if key exists, otherwise nil.
208 209 210 211 |
# File 'lib/dalli/client.rb', line 208 def touch(key, ttl=nil) resp = perform(:touch, key, ttl_or_default(ttl)) resp.nil? ? nil : true end |