info > Cache::SizeAwareFileCache

```html

Cache::SizeAwareFileCache(3pm)

🏷️ NAME

Cache::SizeAwareFileCache -- extends Cache::FileCache

🚀 Quick Reference

Use Case Command Description
Initialize cache with size limit new Cache::SizeAwareFileCache( { 'max_size' => 10000 } ) Creates a new cache instance with a maximum size of 10KB.
Dynamically limit size $cache->limit_size( $size ) Limits the cache size to the specified number of bytes.
Set context namespace 'namespace' => 'MyNamespace' Sets the cache namespace to avoid collisions with other cache data.
Set default expiration 'default_expires_in' => 600 Sets the default expiration time to 600 seconds.

📖 DESCRIPTION

The SizeAwareFileCache class adds the ability to dynamically limit the size (in bytes) of a file system based cache. This class also implements the SizeAwareCache interface, providing the max_size option and the limit_size( $size ) method.

📝 SYNOPSIS

use Cache::SizeAwareFileCache;

my $cache =
  new Cache::SizeAwareFileCache( { 'namespace' => 'MyNamespace',
                                   'default_expires_in' => 600,
                                   'max_size' => 10000 } );

⚙️ METHODS

See Cache::Cache and Cache::SizeAwareCache for the API documentation.

🔧 OPTIONS

See Cache::Cache and Cache::SizeAwareCache for the standard options.

📋 PROPERTIES

See Cache::Cache and Cache::SizeAwareCache for the default properties.

🔗 SEE ALSO

👤 AUTHOR

Original author: DeWitt Clinton dewitt AT unto.net

Also: Portions of this code are a rewrite of David Coppit's excellent extensions to the original File::Cache

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

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

```
Cache::SizeAwareFileCache
🏷️ NAME 🚀 Quick Reference 📖 DESCRIPTION 📝 SYNOPSIS ⚙️ METHODS 🔧 OPTIONS 📋 PROPERTIES 🔗 SEE ALSO 👤 AUTHOR

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-14 20:56 @2600:1f28:365:80b0:4d23:66fa:c2bb:7bae
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!