1Data::ObjectDriver::DriUvseerr::CCoancthreiD:ba:utAtape:ad:cOhPbeej(re3lcptmDD)orciuvmeern:t:aDtriiovner::Cache::Apache(3pm)
2
3
4

NAME

6       Data::ObjectDriver::Driver::Cache::Apache - object driver for caching
7       objects in Apache's request space
8

SYNOPSIS

10           package MyObject;
11           use base qw( Data::ObjectDriver::BaseObject );
12
13           __PACKAGE__->install_properties({
14               ...
15               driver => Data::ObjectDriver::Driver::Cache::Apache->new(
16                   fallback => Data::ObjectDriver::Driver::Cache::Memcached->new(
17                       cache    => Cache::Memcached->new({ servers => \@MEMCACHED_SERVERS }),
18                       fallback => Data::ObjectDriver::Driver::DBI->new( @$DBI_INFO ),
19                   ),
20               ),
21               ...
22           });
23
24           1;
25

DESCRIPTION

27       Data::ObjectDriver::Driver::Cache::Apache provides automatic caching of
28       retrieved objects in the per-request memory space of your Apache
29       mod_perl processes, when used in conjunction with your actual object
30       driver. It can be used to provide even faster results over memcached
31       when requesting objects that have already been requested during the
32       same request by some other part of your application, at the cost of the
33       memory necessary to store the objects.
34
35       If your models can be used in an Apache mod_perl application as well as
36       another context such as a command line shell, consider replacing the
37       Apache layer of your caching with a
38       "Data::ObjectDriver::Driver::Cache::RAM" layer when Apache is not
39       available. See Data::ObjectDriver::Driver::Cache::Apache.
40

USAGE

42       ·   Data::ObjectDriver::Driver::Cache::Apache->new(%params)
43
44           Required members of %params are:
45
46           ·   "fallback"
47
48               The "Data::ObjectDriver" object driver from which to request
49               objects that are not found in the Apache process cache.
50

DIAGNOSTICS

52       The Apache driver provides integration with the "Data::ObjectDriver"
53       debug and profiling systems. As these systems are designed around SQL
54       queries, synthetic queries are logged to represent caching operations.
55       The operations generated by this driver are:
56
57       ·   "APACHECACHE_GET ?"
58
59           Retrieve an object. The argument is the cache key for the requested
60           object.
61
62       ·   "APACHECACHE_ADD ?,?"
63
64           Add an object to the cache. The arguments are the cache key for the
65           object and the flattened representation of the object to cache.
66
67       ·   "APACHECACHE_SET ?,?"
68
69           Put an object in the cache. The arguments are the cache key for the
70           object and the flattened representation of the object to cache.
71
72       ·   "APACHECACHE_DELETE ?"
73
74           Remove an object from the cache. The argument is the cache key for
75           the object to invalidate.
76

SEE ALSO

78       Apache, Apache2::RequestUtil
79

LICENSE

81       Data::ObjectDriver is free software; you may redistribute it and/or
82       modify it under the same terms as Perl itself.
83
85       Except where otherwise noted, Data::ObjectDriver is Copyright 2005-2006
86       Six Apart, cpan@sixapart.com. All rights reserved.
87
88
89
90perl v5.32.0                    Da2t0a2:0:-O0b9j-e1c4tDriver::Driver::Cache::Apache(3pm)
Impressum