-
-
25 Feb 2013 14:45:52 UTC
- Distribution: Catalyst-Plugin-Cache
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Clone repository
- Issues (6)
- Testers (2130 / 13 / 0)
- Kwalitee
Bus factor: 7- 51.43% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (28.42KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Catalyst
- MRO::Compat
- Storable
- Task::Weaken
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Catalyst::Plugin::Cache::Store - how to write a Cache store plugin.
SYNOPSIS
package Catalyst::Plugin::Cache::Store::Frobnicator; sub setup_frobnicator_cache_backend { my ( $app, $name, $config ) = @_; .... $app->register_cache_backend( $name => $cache_object ); }
DESCRIPTION
In order to write a cache store plugin, all you need is to implement a method following the naming convention:
setup_<<lower case store name>>_cache_backend { }
For example
setup_fastmmap_cache_backend
for Catalyst::Plugin::Cache::Store::FastMmap.and call
register_cache_backend
from within that.The method will get the backend name and configuration as it's first and second arguments.
All invokation of the setup methods will be automatic, based on the configuration. However, the plugin must be loaded by the user.
Note that store plugins are only necessary if some configuration defaults that are catalyst specific need to be provided.
For most cases simply using a cache class instead of a plugin is sufficient.
Module Install Instructions
To install Catalyst::Plugin::Cache, copy and paste the appropriate command in to your terminal.
cpanm Catalyst::Plugin::Cache
perl -MCPAN -e shell install Catalyst::Plugin::Cache
For more information on module installation, please visit the detailed CPAN module installation guide.