1SearchBuilder::Record::UCsaecrhaCbolnet(r3i)buted Perl DSoecaurmcehnBtuaitlidoenr::Record::Cachable(3)
2
3
4
6 DBIx::SearchBuilder::Record::Cachable - Records with caching behavior
7
9 package MyRecord;
10 use base qw/DBIx::SearchBuilder::Record::Cachable/;
11
13 This module subclasses the main DBIx::SearchBuilder::Record package to
14 add a caching layer.
15
16 The public interface remains the same, except that records which have
17 been loaded in the last few seconds may be reused by subsequent fetch
18 or load methods without retrieving them from the database.
19
21 FlushCache
22
23 This class method flushes the _global_ DBIx::Searchâ
24 Builder::Record::Cachable cache. All caches are immediately expired.
25
26 _FlushKeyCache
27
28 Blow away this record type's key cache
29
30 _CacheConfig
31
32 You can override this method to change the duration of the caching from
33 the default of 5 seconds.
34
35 For example, to cache records for up to 30 seconds, add the following
36 method to your class:
37
38 sub _CacheConfig {
39 { 'cache_for_sec' => 30 }
40 }
41
43 Matt Knopp <mhat@netlag.com>
44
46 DBIx::SearchBuilder, DBIx::SearchBuilder::Record
47
48
49
50perl v5.8.8 2007-02-17SearchBuilder::Record::Cachable(3)