Get the value corresponding to the given key from the cache
Get the value corresponding to the given key from the cache
the type of the corresponding value
cache key
the value, if there is one
Insert the given key-value pair into the cache, with an optional Time To Live.
Insert the given key-value pair into the cache, with an optional Time To Live.
the type of the corresponding value
cache key
corresponding value
Time To Live
Remove the given key and its associated value from the cache, if it exists.
Remove the given key and its associated value from the cache, if it exists. If the key is not in the cache, do nothing.
cache key
Convert an optional Duration
to an int suitable for passing to Memcached.
Convert an optional Duration
to an int suitable for passing to Memcached.
From the Memcached protocol spec:
The actual value sent may either be Unix time (number of seconds since January 1, 1970, as a 32-bit value), or a number of seconds starting from current time. In the latter case, this number of seconds may not exceed 60*60*24*30 (number of seconds in 30 days); if the number sent by a client is larger than that, the server will consider it to be real Unix time value rather than an offset from current time.
optional TTL
corresponding Memcached expiry
Wrapper around spymemcached
Author: chris Created: 2/19/13