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', deflate => 1 }); $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.
md5
Publishes the given CONTENT at the address DOMAIN and NAME. METADATA is an arbitrary hash; see Jifty::CAS::Blob for more. Returns the key.
CONTENT
DOMAIN
NAME
METADATA
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.
KEY
To install Jifty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jifty
CPAN shell
perl -MCPAN -e shell install Jifty
For more information on module installation, please visit the detailed CPAN module installation guide.