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
Cache::SizeAwareCache(3) User Contributed Perl Documentation Cache::SizeAwareCache(3)

Cache::SizeAwareCache -- extends the Cache interface.

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.

The default cache size limiting algorithm works by removing cache objects in the following order until the desired limit is reached:

  1) objects that have expired
  2) objects that are least recently accessed
  3) objects that expire next

  use Cache::SizeAwareCache;
  use vars qw( @ISA );

  @ISA = qw( Cache::SizeAwareCache );

Please see Cache::Cache for standard constants
$NO_MAX_SIZE
The cache has no size restrictions

Please see Cache::Cache for the standard methods
limit_size( $new_size )
Attempt to resize the cache such that the total disk usage is under the $new_size parameter. $new_size represents t size (in bytes) that the cache should be limited to. Note that this is only a one time adjustment. To maintain the cache size, consider using the max_size option, although it is considered very expensive, and can often be better achieved by periodically calling limit_size.

Please see Cache::Cache for the standard options
max_size
Sets the max_size property (size in bytes), which is described in detail below. Defaults to $NO_MAX_SIZE.

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.

Cache::Cache

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

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

2015-01-22 perl v5.32.1

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

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