Jifty::CAS - Jifty's Content-Addressable Storage facility
Provides an in-memory
md5-addressed content store. Content is stored under a "domain", and can be addressed using wither the "key", which is an
md5 sum, or the "name", which simply stores the most recent key provided with that name.
The default data store is a per-process, in-memory store via Jifty::CAS::Store::Memory. Jifty::CAS::Store::Memcached is also available, and has the benefits of sharing the cache across all instances of a Jifty app using Jifty::CAS. The memcached store is limited to objects less than 1MB in size, however. Jifty::CAS::Store::LocalFile provides a durable store, which is well-suited for sharing the cache across instances and restarts. Because of its speed, however, Jifty::CAS::Store::Nested is suggested to provide a layered cache, most probably with fast memory-based cache in front of a durable, file-based cache.
publish DOMAIN NAME CONTENT METADATA
Publishes the given
CONTENT at the address
METADATA is an arbitrary hash; see Jifty::CAS::Blob for more. Returns the key on success, or undef on failure.
key DOMAIN NAME
Returns the most recent key for the given pair of
NAME, or undef if none such exists.
retrieve DOMAIN KEY
Returns a Jifty::CAS::Blob for the given pair of
KEY, or undef if none such exists.
uri DOMAIN NAME
Returns a URL where the given
NAME can be accessed.
serve DOMAIN ARGUMENT ENV
Serves a plack request in
ENV, given a
DOMAIN and an
ARGUMENT, which may wither be a key or a name. This method is usually only called by "wrap", which calls it as appropriate for all requests under
Returns the Jifty::CAS::Store which backs the given
DOMAIN is not specified, returns the default backing store.
Returns the CAS configuration, as specified in the framework's configuration.
Configures the CAS for use.
Given a PSGI application, wraps it to handle
/__jifty/cas/ requests by calling the appropriate "serve" method.