info > Cache::SizeAwareCache

📛 NAME

Cache::SizeAwareCache — extends the Cache interface.

🚀 Quick Reference

Use CaseCommandDescription
🔧 Implement a size-aware cacheuse Cache::SizeAwareCache; @ISA = qw( Cache::SizeAwareCache );Inherit from this class to add size limiting to your cache implementation
📏 No size limit constant$NO_MAX_SIZEConstant indicating the cache has no size restrictions
✂️ One-time size limit$cache->limit_size( $bytes )Resize the cache to be under the specified byte limit (one-time adjustment)
🔒 Automatic size limitmax_size => $bytesSet option to automatically enforce a max cache size (expensive on every set)
📋 Get/Set max size$cache->get_max_size() / $cache->set_max_size( $bytes )Property accessors for the maximum cache size in bytes

📝 SYNOPSIS

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

@ISA = qw( Cache::SizeAwareCache );

📖 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.

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

🔢 CONSTANTS

Please see Cache::Cache for standard constants

⚙️ METHODS

Please see Cache::Cache for the standard methods

🔧 OPTIONS

Please see Cache::Cache for the standard options

🏷️ PROPERTIES

Please see Cache::Cache for standard properties

🔗 SEE ALSO

Cache::Cache

👤 AUTHOR

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

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

perl v5.20.2   2015-01-22   Cache::SizeAwareCache(3pm)

Cache::SizeAwareCache
📛 NAME 🚀 Quick Reference 📝 SYNOPSIS 📖 DESCRIPTION 🔢 CONSTANTS ⚙️ METHODS 🔧 OPTIONS 🏷️ PROPERTIES 🔗 SEE ALSO 👤 AUTHOR

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-26 05:55 @216.73.217.127
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!