NAME
Jifty::CAS::Store::Nested - A layered CAS store
DESCRIPTION
This is a layered backend for Jifty::CAS, which provides a way to combine multiple CAS backends. Writes are passed through to every layer, whereas reads stop on the first layer which contains the data. This allows a fast in-memory store to be layered on top of a durable file store, for instance.
Configuration requires providing two or more CAS classes:
framework:
CAS:
Default:
Class: Jifty::CAS::Store::Nested
Parts:
- Class: Jifty::CAS::Store::Memory
- Class: Jifty::CAS::Store::LocalFile
Path: %var/cas%
METHODS
BUILD
Constructs the sub-parts and stores them.
_store DOMAIN NAME BLOB
Stores the BLOB (a Jifty::CAS::Blob) in all parts, starting at the bottom. Returns the key on success or undef on failure.
key DOMAIN NAME
Returns the most recent key for the given pair of DOMAIN
and NAME
, or undef if none such exists.
retrieve DOMAIN KEY
Returns a Jifty::CAS::Blob for the given pair of DOMAIN
and KEY
, or undef if none such exists.
durable
If any of the parts are durable, the entire nested CAS backend is durable.