Cache::Object(3pm)
β¨ Cache::Object π
okay so bestie, welcome to Cache::Object β it's the data stored in a Cache, fr fr. This is one of those Perl manpages from the User Contributed Perl Documentation collection, so pull up a chair π«Ά
πΈ NAME πΈ
Cache::Object β the data stored in a Cache. yes that's literally the whole name. iconic. π
π¦ DESCRIPTION π¦
so here's the tea β β Object gets used by the classes that implement the Cache interface, and it's basically an object oriented wrapper around the data. a little cozy lil jacket for your bytes, if you will π§₯β¨
and here's the part where I have to be honest with you: end users will not normally use Object directly. like, that's not the vibe. instead you can get at it through the get_object method on the Cache::Cache interface. that's the door. use the door πͺπ
β SYNOPSIS β
here's how it looks when you're actually doing it, bestie:
use Cache::Object;
my $object = new Cache::Object( );
$object->set_key( $key );
$object->set_data( $data );
$object->set_expires_at( $expires_at );
$object->set_created_at( $created_at );
look at her go πβ¨ so clean, so demure.
π METHODS π
new( )β construct a newCache::Object. that's it, that's the method. baby's first object π
π PROPERTIES π
these all come in (get|set)_whatever flavor, so you can read 'em and write 'em. slay.
(get|set)_accessed_atβ the time at which the object was last accessed. so like, various cache implementations will use theaccessed_atproperty to store info for LRU algorithms β you know, the "who gets yeeted first" math π. but there is no guarantee that all caches will update this field, so don't come for me if it's stale, bestie π(get|set)_created_atβ the time at which the object was created. its birthday πβ¨(get|set)_dataβ a scalar containing, or a reference pointing to, the data to be stored. so it can be a plain scalar OR a ref, either one, no cap π(get|set)_expires_atβ the time at which the object should expire from the cache. it's giving "your time is up" β°π(get|set)_keyβ the key under which the object was stored. its little name tag π·οΈ(get|set)_sizeβ the size of the frozen version of this object. the frozen version specifically, okay? not the thawed one π§π
π SEE ALSO π
Cache::Cacheβ go here, this is the main character π₯
π AUTHOR π
- Original author: DeWitt Clinton
<dewitt@unto.net> - Last author:
$Author: dclinton $ - Copyright (C) 2001-2003 DeWitt Clinton
and that's the whole page, bestie π«Ά written by the perl crew, shipped as part of perl v5.34.0, dated 2022-06-30. mwah π periodt. πβ¨π
π¦ where this page comes from
- debian bookworm: libcache-cache-perl 1.08-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- debian trixie: libcache-cache-perl 1.08-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu noble: libcache-cache-perl 1.08-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu resolute: libcache-cache-perl 1.08-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libcache-cache-perl 1.08-3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms