Module | Cache |
In: |
lib/memcache_util.rb
|
Sets value in the cache at key, with an optional expiry time in seconds. If key already exists in cache, returns nil.
Returns the object at key from the cache if successful, or nil if either the object is not in the cache or if there was an error attermpting to access the cache.
If there is a cache miss and a block is given the result of the block will be stored in the cache with optional expiry, using the add method rather than set.