From: Jess Robinson Date: Wed, 21 Jun 2006 20:47:02 +0000 (+0000) Subject: Added some documentation.. X-Git-Tag: v0.01~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f0237aabe668864ddf958d4fa7434668ffb8e45;hp=5a00a29b1d890fda8aa37325db2c22530258a4ec;p=catagits%2FCatalyst-Plugin-Cache.git Added some documentation.. --- diff --git a/lib/Catalyst/Plugin/Cache.pm b/lib/Catalyst/Plugin/Cache.pm index 9a98747..9e73ce0 100644 --- a/lib/Catalyst/Plugin/Cache.pm +++ b/lib/Catalyst/Plugin/Cache.pm @@ -295,7 +295,47 @@ Amongst it's features are support for multiple backends, segmentation based on component or controller, keyspace partitioning and so forth, in various sub plugins. -=head1 TERMINOLIGY +=head1 CONFIGURATION + + $c->config->{cache} = { + backend => '', + }; + +All configuration parameters should be provided in a hash reference under the +C key in the C hash. + +=over 4 + +=item class + +Load an entire set of Caching modules. + +=item backend + +The specific backend you want to use. + +=item backends + +A hashref with backend names as keys, and module names as values. One of these +should have the key "default" to indicate the default backend. + +=item default_store + +The store you are using. This must be supplied if you have loaded multiple +store plugins. + +=item curried_class + +The currying class you are using, defaults to L. + +=item profiles + +Supply your own predefined profiles for cache namespacing. + + +=back + +=head1 TERMINOLOGY =over 4 @@ -308,8 +348,19 @@ L (or more). A plugin that provides backends of a certain type. This is a bit like a factory. +=item cache + +Stored key/value pairs of data for easy re-access. + =item curried cache + my $cache = $c->cache(type => 'thumbnails'); + $cache->set('pic01', $thumbnaildata); + +A cache which has been pre-configured with a particular set of namespacing +data. In the example the cache returned could be one specifically tuned +for storing thumbnails. + An object that responds to C, C and C, and will automatically add meta data to calls to C<< $c->cache_get >>, etc.