Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Cache::CacheSizer

Name Cache::CacheSizer
Version
Located at /usr/share/perl5
File /usr/share/perl5/Cache/CacheSizer.pm
Is Core No
Search CPAN for this module Cache::CacheSizer
Documentation Cache::CacheSizer
Module Details Cache::CacheSizer


NAME

Cache::CacheSizer -- component object for managing the size of caches


DESCRIPTION

The CacheSizer class is used internally in SizeAware caches such as SizeAwareFileCache to encapsulate the logic of limiting cache size.


SYNOPSIS

  use Cache::CacheSizer;
  my $sizer = new Cache::CacheSizer( $cache, $max_size );
  $sizer->limit_size( $new_size );


METHODS

new( $cache, $max_size )
Construct a new Cache::CacheSizer object for the cache $cache with a maximum size of $max_size.

update_access_time( $key )
Inform the cache that the object specified by $key has been accessed.

limit_size( $new_size )
Use the sizing algorithms to get the cache down under $new_size if possible.


PROPERTIES

get_max_size
The desired size limit for the cache under control.


SEE ALSO

Cache::Cache, Cache::CacheMetaData, Cache::SizeAwareCache


AUTHOR

Original author: DeWitt Clinton <dewitt@unto.net>

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026