1Rose::DB::Cache::Entry(U3s)er Contributed Perl DocumentatRioosne::DB::Cache::Entry(3)
2
3
4
6 Rose::DB::Cache::Entry - A cache entry for use with Rose::DB::Cache
7 objects.
8
10 package My::DB::Cache::Entry;
11
12 use base 'Rose::DB::Cache::Entry';
13 ...
14
15 package My::DB::Cache;
16
17 use base 'Rose::DB::Cache';
18
19 use My::DB::Cache::Entry;
20
21 __PACKAGE__->entry_class('My::DB::Cache::Entry');
22 ...
23
25 Rose::DB::Cache::Entry provides both an API and a default
26 implementation of a cache entry for use with Rose::DB::Cache objects.
27 A Rose::DB::Cache-derived class uses Rose::DB::Cache::Entry-derived
28 objects to store cache entries.
29
30 The default implementation includes attributes for storing the cache
31 key, the cached Rose::DB-derived object itself, and some boolean flags.
32 Subclasses can add new attributes as desired.
33
35 new PARAMS
36 Constructs a new Rose::DB::Cache::Entry object based on PARAMS,
37 where PARAMS are name/value pairs. Any object method is a valid
38 parameter name.
39
41 created_during_apache_startup [BOOL]
42 Get or set a boolean value indicating whether or not the db object
43 this cache entry contains was created while the apache server was
44 starting up.
45
46 db [DB]
47 Get or set the Rose::DB-derived object stored in this cache entry.
48
49 key [KEY]
50 Get or set the cache key for this entry.
51
52 prepared [BOOL]
53 Get or set a boolean value indicating whether or not a cache entry
54 is "prepared." The interpretation of this flag is up to the
55 Rose::DB::Cache-derived class that uses this entry class.
56
57 is_prepared
58 Returns true if prepared is true, false otherwise.
59
61 John C. Siracusa (siracusa@gmail.com)
62
64 Copyright (c) 2010 by John C. Siracusa. All rights reserved. This
65 program is free software; you can redistribute it and/or modify it
66 under the same terms as Perl itself.
67
68
69
70perl v5.32.0 2020-07-28 Rose::DB::Cache::Entry(3)