Take me over?
NAME
cachecache - a plugin that provides a cache API using the Cache::Cache module
SYNOPSIS
in axkit.conf:
Plugin cachecache
# mandatory:
CacheModule File
# optional:
CacheSize 10000
CacheNamespace wibble
CacheExpiresIn 300
in your plugin:
my $cache = $self->cache();
DESCRIPTION
This module provides every plugin with a $self->cache()
method to access a cache. This could be used for storing database output, LDAP results, Session data, or just about any scalar.
USAGE
Please see Cache::Cache for the API of the $cache
object returned. The construction of the cache object is done for you using the parameters specified in the config file.
CONFIG
CacheModule ( File | Memory | SharedMemory )
Configures which cache module to use. The SharedMemory module doesn't make much sense since AxKit2 is a single process, so just use File
or Memory
.
CacheSize NNN
If specified, will try to use the "SizeAware" versions of the cache modules and specify the cache size as given (in bytes, according to the Cache::Cache docs).
CacheNamespace STRING
Will use a cache under the given namespace. This provides a way to separate your caches on a per-application basis.
CacheExpiresIn NNN
Number of seconds before objects in the cache expire.