Rose::...:Cached(3pm)
π NAME π
okay so bestie, welcome to the Rose::DB::Object::Std::Cached page from the User Contributed Perl Documentation (3pm) π β and this class is literally a memory cached standardized object representation of a single row in a database table. It's giving βyour database row, but cozy in memoryβ energy, no cap β¨
β¨ SYNOPSIS β¨
here's the whole vibe, copied exactly so you can just run with it π«Ά
package Category;
use base 'Rose::DB::Object::Std::Cached';
__PACKAGE__->meta->setup
(
table => 'categories',
columns =>
[
id => { type => 'int', primary_key => 1 },
name => { type => 'varchar', length => 255 },
description => { type => 'text' },
],
unique_key => 'name',
);
...
$cat1 = Category->new(id => 123,
name => 'Art');
$cat1->save or die $category->error;
$cat2 = Category->new(id => 123);
# This will load from the memory cache, not the database
$cat2->load or die $cat2->error;
# $cat2 is the same object as $cat1
print "Yep, cached" if($cat1 eq $cat2);
# No, really, it's the same object
$cat1->name('Blah');
print $cat2->name; # prints "Blah"
...
π DESCRIPTION π
so Rose::DB::Object::Std::Cached is a subclass of both Rose::DB::Object::Std and Rose::DB::Object::Cached β it simply combines the features of both classes. literally both, bestie, not a knockoff π
for the full lore, see the Rose::DB::Object::Std and Rose::DB::Object::Cached documentation for more information πβ¨
π AUTHOR π
John C. Siracusa (siracusa@gmail.com) β iconic, honestly π«Ά
π 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. periodt π
perl v5.40.1, dated 2025-08-21 β that's a wrap on this manual-page moment, bestie! π
πβ¨
π¦ where this page comes from
- ubuntu resolute: librose-db-object-perl 1:0.822-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librose-db-object-perl 1:0.822-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms