Cache::CacheMetaData(3pm) User Contributed Perl Documentation Cache::CacheMetaData(3pm)NAME
Cache::CacheMetaData -- data about objects in the cache
DESCRIPTION
The CacheMetaData object is used by size aware caches to keep track of the state of the cache and effeciently return information such as an
objects size or an ordered list of indentifiers to be removed when a cache size is being limited. End users will not normally use
CacheMetaData directly.
SYNOPSIS
use Cache::CacheMetaData;
my $cache_meta_data = new Cache::CacheMetaData( );
foreach my $key ( $cache->get_keys( ) )
{
my $object = $cache->get_object( $key ) or
next;
$cache_meta_data->insert( $object );
}
my $current_size = $cache_meta_data->get_cache_size( );
my @removal_list = $cache_meta_data->build_removal_list( );
METHODS
new( )
Construct a new Cache::CacheMetaData object
insert( $object )
Inform the CacheMetaData about the object $object in the cache.
remove( $key )
Inform the CacheMetaData that the object specified by $key is no longer in the cache.
build_removal_list( )
Create a list of the keys in the cache, ordered as follows:
1) objects that expire now
2) objects expiring at a particular time, with ties broken by the time at which they were least recently accessed
3) objects that never expire, sub ordered by the time at which they were least recently accessed
NOTE: This could be improved further by taking the size into account on accessed_at ties. However, this type of tie is unlikely in
normal usage.
build_object_size( $key )
Return the size of an object specified by $key.
PROPERTIES
get_cache_size
The total size of the objects in the cache
SEE ALSO
Cache::Cache, Cache::CacheSizer, Cache::SizeAwareCache
AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net>
Last author: $Author: dclinton $
Copyright (C) 2001-2003 DeWitt Clinton
perl v5.12.4 2009-03-01 Cache::CacheMetaData(3pm)
Check Out this Related Man Page
Cache::SizeAwareFileCache(3pm) User Contributed Perl Documentation Cache::SizeAwareFileCache(3pm)NAME
Cache::SizeAwareFileCache -- extends Cache::FileCache
DESCRIPTION
The SizeAwareFileCache class adds the ability to dynamically limit the size (in bytes) of a file system based cache. This class also
implements the SizeAwareCache interface, providing the 'max_size' option and the 'limit_size( $size )' method.
SYNOPSIS
use Cache::SizeAwareFileCache;
my $cache =
new Cache::SizeAwareFileCache( { 'namespace' => 'MyNamespace',
'default_expires_in' => 600,
'max_size' => 10000 } );
METHODS
See Cache::Cache and Cache::SizeAwareCache for the API documentation.
OPTIONS
See Cache::Cache and Cache::SizeAwareCache for the standard options.
PROPERTIES
See Cache::Cache and Cache::SizeAwareCache for the default properties.
SEE ALSO
Cache::Cache, Cache::SizeAwareCache, Cache::FileCache
AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net>
Also: Portions of this code are a rewrite of David Coppit's excellent extentions to the original File::Cache
Last author: $Author: dclinton $
Copyright (C) 2001-2003 DeWitt Clinton
perl v5.12.4 2009-03-01 Cache::SizeAwareFileCache(3pm)
Greetings,
I haven't posted in a while and have a Firefox question.
I'm running Firefox 2.0.0.6 on Ubuntu 710 and am wondering if there is a way to increase the maximum size of files captured into the cache. The cache size was 50 megabytes and that seemed limit the files to 24 Meg. Increasing... (0 Replies)
Hi Chaps and Chappettes,
I've had a short period of time recently to learn and implement DNS cache-only in our organisation. Trouble is, according to my tcpdumps, the amount of traffic on port 53 has increased. This is of course the exact opposit of the desired effect. Would y'all mind looking... (2 Replies)
Hi all
I saw in Microsoft web site www.SysInternals.com a tool called CoreInfo from able to print out on screen the size of the Data and Instruction caches of your processor, the Locigal to Physical Processor mapping, the number of the CPU sockets. etc..
Do you know if in Linux is available a... (2 Replies)
Hello all
i have simple server running on linux redhat 6.1
it is build with c++
in the server i have huge std vector that holds pointers to cache objects
those cache objects holds allot of data from the DB
any way ...
in some point in time there is simple API that suppose to clean the... (2 Replies)