GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CACHE::AGAINSTFILE::CACHEMODULE (3)

.ds Aq ’

NAME

Cache::AgainstFile::CacheModule - use Cache or Cache::Cache modules for Cache::AgainstFile

CONTENTS

SYNOPSIS



        use Cache::AgainstFile;
        my $cache = new Cache::AgainstFile(
                \&loader,
                {
                        Method => CacheModule,
                        CacheModule => Cache::MemoryCache, #This will be loaded on demand
                        CacheModuleOptions => {default_expires_in => 300},
                        # ...
                }
        );

        $data = $cache->get($filename);



DESCRIPTION

This backend allows you to apply Cache::AgainstFile to any of the modules on CPAN that conform to the Cache::Cache or Cache interfaces. Data structures are automatically serialised into the cache.

OPTIONS

CacheModule The module to use for the cache implementation (e.g. Cache::MemoryCache)
CacheModuleOptions A hashref of options to pass to the cache module’s constructor
Grace How long to defer statting the file (in seconds). This option is only any use with memory caches for two reasons:

First, for filesystem caches, the cost of fetching an item from the cache far exceeds the cost of statting a file.

Second, unlike the file modification time which is stored within the cache itself, the history of when files were last statted is held in memory, so that the cache does not need to be reserialised on each stat. Therefore the stat history is not shared between processes.

Be careful if you use this in modperl environments as it will result in some children having a new version of the cached item, and some still having the old version.

NoStat Don’t stat files to validate the cache - items are served from the cache until they are purged. Valid values are 0|1 (default=0, i.e. files are statted)

Setting this to 1 is equivalent to setting Grace to an infinite value.

VERSION

$Revision: 1.9 $ on $Date: 2005/10/31 21:10:41 $ by $Author: johna $

AUTHOR

John Alden <cpan _at_ bbc _dot_ co _dot_ uk>

COPYRIGHT

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL.

See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CACHE::AGAINSTFILE::CACHEMODULE (3) 2006-05-09

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.