NAME
Apache::Session::Store::CacheAny - use Cache::* for Apache::Session storage
SYNOPSIS
tie %auto_expire_session, 'Apache::Session::CacheAny', $sid, {
CacheImpl => 'Cache::SizeAwareFileCache',
DefaultExpiresIn => '2 hours',
};
# or use with another locking scheme!
use Apache::Session::Flex;
tie %hash, 'Apache::Session::Flex', $id, {
Store => 'CacheAny',
Lock => 'File',
Generate => 'MD5',
Serialize => 'Storable',
CacheImpl => 'Cache::SharedMemoryCache',
};
DESCRIPTION
Apache::Session::Store::CacheAny implpements the storage interface for Apache::Session. Session data is stored using one of Cache::Cache imeplementations.
CONFIGURATIONS
This module wants to know standard options for Cache::Cache. You can specify these options as Apache::Session's tie options like this:
tie %size_aware_session, 'Apache::Session::CacheAny', $sid, {
CacheImpl => 'Cache::SizeAwareFileCache',
Namespace => 'apache-session-cacheany',
DefaultExpiresIn => '2 hours',
AutoPurgeOnGet => 0,
AutoPurgeOnSet => 1,
MaxSize => 10_000,
CacheRoot => '/tmp',
CacheDepth => 3,
DirectoryUmask => 077,
};
Note that spelling of options are slightly differernt from those for Cache::Cache. Here is a conversion table.
A::S::Store::CacheAny => Cache::Cache
-----------------------------------------
Namespace => namespace
DefaultExpiresIn => default_expires_in
AutoPurgeInterval => auto_purge_interval
AutoPurgeOnSet => auto_purge_on_set
AutoPurgeOnGet => auto_purge_on_get
MaxSize => max_size
CacheRoot => cache_root
CacheDepth => cache_depth
DirectoryUmask => directory_umask
See Cache::Cache for details.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Apache::Session::CacheAny, Apache::Session::Flex, Cache::Cache