Class | Merb::Cache::AdhocStore |
In: |
lib/merb-cache/stores/strategy/adhoc_store.rb
|
Parent: | AbstractStrategyStore |
General purpose store, use for your own contexts. Since it wraps access to multiple fundamental stores, it‘s easy to use this strategy store with distributed cache stores like Memcached.
new | -> | [] |
stores | [RW] |
deletes all entries for the key & parameters for the store. considered dangerous because strategy stores which call delete_all! on their context stores could delete other store‘s entrees.
returns true/false/nil based on if data identified by the key & parameters is persisted in the store.
tries to read the data from the store. If that fails, it calls the block parameter and persists the result. If it cannot be fetched, the block call is returned.
gets the data from the store identified by the key & parameters. return nil if the entry does not exist.
persists the data so that it can be retrieved by the key & parameters. returns nil if it is unable to persist the data. returns true if successful.
persists the data to all context stores. returns nil if none of the stores were able to persist the data. returns true if at least one write was successful.