Rose::DB::Cache::Entry(3pm)

Rose::DB::Cache::Entry3pm

A cache entry for use with rose::db::cache objects.

Usage

  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');
  ...

Overview

Rose::DB::Cache::Entry provides both an API and a default implementation of a cache entry for use with Rose::DB::Cache objects. A Rose::DB::Cache-derived class uses Rose::DB::Cache::Entry-derived objects to store cache entries.

The default implementation includes attributes for storing the cache key, the cached Rose::DB-derived object itself, and some boolean flags. Subclasses can add new attributes as desired.

Constructors

new PARAMS

Constructs a new Rose::DB::Cache::Entry object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name.

Object methods

created_during_apache_startup [BOOL]

Get or set a boolean value indicating whether or not the db object this cache entry contains was created while the apache server was starting up.

db [DB]

Get or set the Rose::DB-derived object stored in this cache entry.

key [KEY]

Get or set the cache key for this entry.

prepared [BOOL]

Get or set a boolean value indicating whether or not a cache entry is "prepared." The interpretation of this flag is up to the Rose::DB::Cache-derived class that uses this entry class.

is_prepared

Returns true if prepared is true, false otherwise.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 7 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9–10
  6. 11
  7. 12
  8. 13

Author

John C. Siracusa ([email protected])

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.

From librose-db-perl 0.786-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.