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::CACHEMETADATA (3)

.ds Aq ’

NAME

Cache::CacheMetaData -- data about objects in the cache

CONTENTS

DESCRIPTION

The CacheMetaData object is used by size aware caches to keep track of the state of the cache and efficiently return information such as an objects size or an ordered list of identifiers 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

<B>new( )B> Construct a new Cache::CacheMetaData object
<B>insert( B>$object<B> )B> Inform the CacheMetaData about the object $object in the cache.
<B>remove( B>$key<B> )B> Inform the CacheMetaData that the object specified by $key is no longer in the cache.
<B>build_removal_list( )B> 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.

<B>build_object_size( B>$key<B> )B> Return the size of an object specified by $key.

PROPERTIES

<B>get_cache_sizeB> 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

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


perl v5.20.3 CACHE::CACHEMETADATA (3) 2015-01-22

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