Rose::...:Entry(3pm)

✨ Rose::DB::Cache::Entry ✨

okay so picture this: it's a <pink>Perl</pink> manpage from the User Contributed Perl Documentation collection, and bestie, it's literally about one (1) thing β€” a single cache entry that lives inside a Rose::DB::Cache object. tiny. precious. iconic. πŸ’–


🌸 NAME 🌸

Rose::DB::Cache::Entry β€” a cache entry for use with Rose::DB::Cache objects. that's it, that's the whole job description. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

package My::DB::Cache::Entry;

use base 'Rose::DB::Cache::Entry';
...

package My::DB::Cache;

use base 'Rose::DB::Cache';

use My::DB::Cache::Entry;

__PACKAGE__->entry_class('My::DB::Cache::Entry');
...

see how the entry class gets handed to the cache class through entry_class? that's the whole glow-up pipeline right there. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so Rose::DB::Cache::Entry gives you both an API and a default implementation of a cache entry for use with Rose::DB::Cache objects. no cap. a Rose::DB::Cache-derived class uses Rose::DB::Cache::Entry-derived objects to actually store its cache entries. 🫢

the default implementation ships with attributes for storing:

  • the cache key πŸ”‘
  • the cached Rose::DB-derived object itself 🌟
  • and some boolean flags 🚩

and here's the fun part: subclasses can just add new attributes whenever they want. go off, bestie. πŸ‘‘


πŸ’œ CONSTRUCTORS πŸ’œ

  • new PARAMS β€” constructs a brand new Rose::DB::Cache::Entry object based on PARAMS, where PARAMS are name/value pairs. and the lil treat here? any object method is a valid parameter name. so go crazy. πŸŽ‰

πŸ‘‘ OBJECT METHODS πŸ‘‘

  • created_during_apache_startup [BOOL] β€” get or set a boolean value telling you whether or not the db object inside this cache entry was created while the apache server was starting up. yes, apache. yes, startup. it matters, iykyk. 🧚
  • db [DB] β€” get or set the Rose::DB-derived object stored in this cache entry. the main character of the entry, honestly. πŸ’–
  • key [KEY] β€” get or set the cache key for this entry. πŸ”‘
  • prepared [BOOL] β€” get or set a boolean value saying whether or not a cache entry is "prepared." now listen: what that flag means is entirely up to the Rose::DB::Cache-derived class that uses this entry class. the entry does not decide. the entry just holds the vibe. πŸ™ˆ
  • is_prepared β€” returns true if prepared is true, false otherwise. short, sweet, slays. ✨

🌈 AUTHOR 🌈

John C. Siracusa (siracusa@gmail.com) β€” ty for your service, legend πŸ«‘πŸ’œ


πŸ“ LICENSE πŸ“

Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's a wrap on this lil guy 🌸 this page came to you from perl v5.40.1, dated 2026-07-31, filed under Rose::...:Entry(3pm) β€” stay caffeinated, stay cached, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from