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
Cache::AgainstFile::Memory(3) User Contributed Perl Documentation Cache::AgainstFile::Memory(3)

Cache::AgainstFile::Memory - cache data parsed from files in memory

        use Cache::AgainstFile;
        my $cache = new Cache::AgainstFile(
                \&loader, 
                {
                        Method => 'Memory',
                        MaxItems => 16,
                        # ...
                }
        );

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

Data structures parsed from files are cached in memory. This is particularly suited to persistent environments such as modperl or other daemon processes.

For short-lived processes such as CGI scripts, the Storable backend might be more appropriate.

Note that the "size()" method uses Devel::Size if available, otherwise it returns undef. Devel::Size can consume a reasonable amount of memory working out how much memory you are using! This memory is released after the operation but it will have expanded your process' memory footprint in the process.

Grace
How long to defer statting the file (in seconds). 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.

MaxATime
Purge items older than this. Value is in seconds (default=undefined=infinity)
MaxItems
Purge oldest items to reduce cache to this size. Value should be an integer (default=undefined=infinity)

$Revision: 1.15 $ on $Date: 2005/11/10 15:13:57 $ by $Author: johna $

John Alden & Piers Kent <cpan _at_ bbc _dot_ co _dot_ uk>

(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

2006-05-09 perl v5.32.1

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

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