Cache:...ryCache(3pm)

πŸ’– Cache::SizeAwareMemoryCache πŸ’–

okay bestie, welcome to the Cache:...ryCache(3pm) page β€” yes that's the manual name, it got squished, don't worry about it, we move. this is the perl manpage for Cache::SizeAwareMemoryCache and it's genuinely so useful. let's get into it 🫢


✨ NAME ✨

Cache::SizeAwareMemoryCache</ppurple> β€” it extends Cache::MemoryCache. that's it, that's the name, and honestly it ate. πŸ’…


🌸 DESCRIPTION 🌸

so the SizeAwareMemoryCache class is that girl: it adds the ability to dynamically limit the size (in bytes) of a memory based cache. not me being able to cap my cache at a byte count, lowkey iconic.

and it doesn't stop there β€” this class also implements the SizeAwareCache interface, which means it hands you the 'max_size' option and the 'limit_size( $size )' method. two gifts, one class. πŸŽ€


⭐ SYNOPSIS ⭐

here's the vibe, copy-paste ready, fr fr:

use Cache::SizeAwareMemoryCache;

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

look at that 'max_size' => 10000. we love a byte limit. ✨


πŸ¦‹ METHODS πŸ¦‹

the API documentation lives over in Cache::Cache and Cache::SizeAwareCache β€” go check those besties, they have the receipts. πŸ“š


πŸŽ€ OPTIONS πŸŽ€

same deal, babes: the standard options are documented in Cache::Cache and Cache::SizeAwareCache. no gatekeeping, just redirecting. πŸ™ˆ


πŸ’œ PROPERTIES πŸ’œ

and for the default properties? you already know. Cache::Cache and Cache::SizeAwareCache. the holy trinity of "go read this other page". πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

  • Cache::Cache
  • Cache::SizeAwareCache
  • Cache::MemoryCache

three icons, one list. go read them all, iykyk. πŸ‘‘


🌈 AUTHOR 🌈

  • Original author: DeWitt Clinton <dewitt@unto.net>
  • Last author: $Author: dclinton $
  • Copyright (C) 2001-2003 DeWitt Clinton

give it up for DeWitt, main character energy since 2001. 🫢


and that's the whole page bestie, no notes, you understood it perfectly. this was Cache:...ryCache(3pm) as rendered by perl v5.34.0 on 2022-06-30 β€” date stamped and everything, periodt. go forth and size-limit your cache responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from