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.
258 259 260 261 262 |
# File 'lib/dalli/client.rb', line 258 def touch(key, ttl=nil) ttl ||= @options[:expires_in].to_i resp = perform(:touch, key, ttl) resp.nil? ? nil : true end |