| 1 | package EntityModel::Cache; | ||
| 2 | { | ||
| 3 | 22 | $EntityModel::Cache::VERSION = '0.102'; | |
| 4 | } | ||
| 5 | 22 | ▶ | use EntityModel::Class { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 22 | }; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | EntityModel::Cache - base class for L<EntityModel> caching support | ||
| 11 | |||
| 12 | =head1 VERSION | ||
| 13 | |||
| 14 | version 0.102 | ||
| 15 | |||
| 16 | =head1 SYNOPSIS | ||
| 17 | |||
| 18 | See L<EntityModel>. | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | See L<EntityModel>. | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | =head1 METHODS | ||
| 27 | |||
| 28 | =cut | ||
| 29 | |||
| 30 | =head2 new | ||
| 31 | |||
| 32 | Instantiate class. Currently takes no parameters. | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 37 | 1 | my $class = shift; | |
| 38 | 1 | my $self = bless { }, $class; | |
| 39 | 1 | return $self; | |
| 40 | } | ||
| 41 | |||
| 42 | =head2 get | ||
| 43 | |||
| 44 | Get value from the cache corresponding to the given key. | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 0 | ▶ | sub get { die 'Virtual method' } |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 49 | |||
| 50 | =head2 remove | ||
| 51 | |||
| 52 | Remove the given key from the cache. | ||
| 53 | |||
| 54 | =cut | ||
| 55 | |||
| 56 | 0 | ▶ | sub remove { die 'Virtual method' } |
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 57 | |||
| 58 | =head2 incr | ||
| 59 | |||
| 60 | Atomically increment the value for the given key. | ||
| 61 | |||
| 62 | =cut | ||
| 63 | |||
| 64 | 0 | ▶ | sub incr { die 'Virtual method' } |
|
Subroutine
incr: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 65 | |||
| 66 | =head2 incr | ||
| 67 | |||
| 68 | Atomically decrement the value for the given key. | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 | 0 | ▶ | sub decr { die 'Virtual method' } |
|
Subroutine
decr: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 73 | |||
| 74 | =head2 set | ||
| 75 | |||
| 76 | Set the value for the given key. Optionally provide a timeout value as 3rd parameter. | ||
| 77 | |||
| 78 | =cut | ||
| 79 | |||
| 80 | 0 | ▶ | sub set { die 'Virtual method' } |
|
Subroutine
set: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 81 | |||
| 82 | =head2 atomic | ||
| 83 | |||
| 84 | Atomic set. Locks until the coderef is complete and returns the value. | ||
| 85 | |||
| 86 | =cut | ||
| 87 | |||
| 88 | 0 | ▶ | sub atomic { die 'Virtual method' } |
|
Subroutine
atomic: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 89 | |||
| 90 | 22 | 1; | |
| 91 | |||
| 92 | __END__ | ||