package Rose::DB::Cache::Entry; use strict; use base 'Rose::Object'; our $VERSION = '0.736'; use Rose::Object::MakeMethods::Generic ( 'scalar' => [ 'db', 'key', ], 'boolean' => [ 'prepared', 'created_during_apache_startup', ] ); *is_prepared = \&prepared; 1; __END__ =head1 NAME Rose::DB::Cache::Entry - A cache entry for use with Rose::DB::Cache objects. =head1 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'); ... =head1 DESCRIPTION L provides both an API and a default implementation of a cache entry for use with L objects. A L-derived class L L-derived objects to store cache entries. The default implementation includes attributes for storing the cache key, the cached L-derived object itself, and some boolean flags. Subclasses can add new attributes as desired. =head1 CONSTRUCTORS =over 4 =item B Constructs a new L object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name. =back =head1 OBJECT METHODS =over 4 =item B Get or set a boolean value indicating whether or not the L object this cache entry contains was created while the apache server was starting up. =item B Get or set the L-derived object stored in this cache entry. =item B Get or set the cache key for this entry. =item B Get or set a boolean value indicating whether or not a cache entry is "prepared." The interpretation of this flag is up to the L-derived class that L this entry class. =item B Returns true if L is true, false otherwise. =back =head1 AUTHOR John C. Siracusa (siracusa@gmail.com) =head1 LICENSE Copyright (c) 2009 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.