Class | Merb::Cache::MemcachedStore |
In: |
lib/merb-cache/stores/fundamental/memcached_store.rb
|
Parent: | AbstractStore |
Memcached store uses one or several Memcached servers for caching. It‘s flexible and can be used for fragment caching, action caching, page caching or object caching.
memcached | [RW] | |
namespace | [RW] | |
servers | [RW] |
Establishes connection to Memcached.
Use :buffer_requests option to use bufferring, :no_block to use non-blocking async I/O.
returns true/false/nil based on if data identified by the key & parameters is persisted in the store.
With Memcached 1.2 protocol the only way to find if key exists in the cache is to read it. It is very fast and shouldn‘t be a concern.
Fetches cached data by key if it exists. If it does not, uses passed block to get new cached value and writes it using given key.