Module: Memcached::Experimental
- Defined in:
- lib/memcached/experimental.rb
Instance Method Summary collapse
-
#touch(key, ttl = @default_ttl) ⇒ Object
TOUCH is used to set a new expiration time for an existing item.
Instance Method Details
#touch(key, ttl = @default_ttl) ⇒ Object
TOUCH is used to set a new expiration time for an existing item
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/memcached/experimental.rb', line 4 def touch(key, ttl=@default_ttl) check_return_code( Lib.memcached_touch(@struct, key, ttl), key ) rescue => e tries ||= 0 raise unless should_retry(e, tries) tries += 1 retry end |