Cache:...heSizer(3pm)

okay so bestie, welcome to the Cache::CacheSizer(3pm) page β€” it's from the User Contributed Perl Documentation, and it's literally the component object that handles cache size vibes. πŸ’…


✨ NAME ✨

Cache::CacheSizer β€” component object for managing the size of caches. no cap, that's the whole name. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

The CacheSizer class is used internally in SizeAware caches such as SizeAwareFileCache to encapsulate the logic of limiting cache size. it's giving internal helper energy, but make it size-control. 🫢


🌸 SYNOPSIS 🌸

use Cache::CacheSizer;

my $sizer = new Cache::CacheSizer( $cache, $max_size );

$sizer->limit_size( $new_size );

πŸŽ€ METHODS πŸŽ€

here's the whole method roster, and yes we're keeping every single one.

  • new( $cache, $max_size ) β€” Construct a new Cache::CacheSizer object for the cache $cache with a maximum size of $max_size. it's the birth of your sizer, periodt. πŸ‘‘
  • update_access_time( $key ) β€” Inform the cache that the object specified by $key has been accessed. basically telling the cache "bestie was here" so it knows what's fresh. ✨
  • limit_size( $new_size ) β€” Use the sizing algorithms to get the cache down under $new_size if possible. note the "if possible" β€” it's not out here making promises it can't keep. 😭

πŸ¦‹ PROPERTIES πŸ¦‹

  • get_max_size β€” The desired size limit for the cache under control. that's the goal number, the ceiling, the main character limit. πŸ‘‘

🌈 SEE ALSO 🌈

  • Cache::Cache
  • Cache::CacheMetaData
  • Cache::SizeAwareCache

go read those too, iykyk. ✨


πŸ‘‘ AUTHOR πŸ‘‘

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

all the credit, all the copyright, exactly as written. πŸ’œ


that's the whole page! footer tea: perl v5.34.0, dated 2022-06-30, for Cache:...heSizer(3pm). bye bestie! πŸ’–

πŸ“¦ where this page comes from