Cache::CacheSizer(3pm)

Cache::CacheSizer3pm

Usage

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

Overview

The CacheSizer class is used internally in SizeAware caches such as SizeAwareFileCache to encapsulate the logic of limiting cache 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.

Releases

12 releases since Debian 3.0 (Woody); the text changed 7 times.

  1. 3.0
  2. 3.1
  3. 4.0–5.0
  4. 6.0
  5. 7
  6. 8
  7. 9–11
  8. 12–13

Author

Original author: DeWitt Clinton <[email protected]>

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

From libcache-cache-perl 1.08-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.