NAME
Cache::SizeAwareCache -- extends the Cache interface.
DESCRIPTION
The SizeAwareCache interface is implemented by classes that support all of the Cache::Cache interface in addition to the limit_size and max_size features of a size aware cache.
SYNOPSIS
use Cache::SizeAwareCache;
use vars qw( @ISA );
@ISA = qw( Cache::SizeAwareCache );
CONSTANTS
Please see Cache::Cache for standard constants
METHODS
Please see Cache::Cache for standard methods
- limit_size( $new_size )
-
Attempt to resize the cache such that the total disk usage is under the 'new_size' parameter.
OPTIONS
Please see Cache::Cache for standard options
- max_size
-
Sets the max_size property (size in bytes), which is described in detail below. Defaults to $NO_MAX_SIZE.
PROPERTIES
Please see Cache::Cache for standard properties
- (get|set)_max_size
-
If this property is set, then the cache will try not to exceed the max size value (in bytes) specified. NOTE: This causes the size of the cache to be checked on every set, and can be considered *very* expensive in some implementations. A good alternative approach is leave max_size as $NO_MAX_SIZE and to periodically limit the size of the cache by calling the limit_size( $size ) method.
SEE ALSO
Cache::Cache
AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net>
Last author: $Author: dclinton $
Copyright (C) 2001 DeWitt Clinton