|
|
| |
Jifty::CAS(3) |
User Contributed Perl Documentation |
Jifty::CAS(3) |
Jifty::CAS - Jifty's Content-Addressable Storage facility
my $key = Jifty::CAS->publish('js' => 'all', $content,
{ hash_with => $content, # default behaviour
content_type => 'application/x-javascript',
});
$ie_key = Jifty::CAS->publish('js' => 'ie-only', $ie_content,
{ hash_with => $ie_content,
content_type => 'application/x-javascript',
});
$key = Jifty::CAS->key('js', 'ie-only');
my $blob = Jifty::CAS->retrieve('js', $key);
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.
Publishes the given "CONTENT" at the address
"DOMAIN" and
"NAME".
"METADATA" is an arbitrary hash; see
Jifty::CAS::Blob for more. Returns the key on success, or undef on failure.
Returns the most recent key for the given pair of
"DOMAIN" and
"NAME", or undef if none such exists.
Returns a Jifty::CAS::Blob for the given pair of
"DOMAIN" and
"KEY", or undef if none such exists.
Returns a URL where the given "DOMAIN" and
"NAME" can be accessed.
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
"/__jifty/cas/".
Returns the Jifty::CAS::Store which backs the given
"DOMAIN". If
"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.
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |