Lines 38-44
The first, traditional OO interface provides the following functions:
Link Here
|
38 |
use strict; |
38 |
use strict; |
39 |
use warnings; |
39 |
use warnings; |
40 |
use Carp; |
40 |
use Carp; |
41 |
use Clone qw( clone ); |
41 |
use Storable qw(dclone); |
42 |
use Module::Load::Conditional qw(can_load); |
42 |
use Module::Load::Conditional qw(can_load); |
43 |
use Koha::Cache::Object; |
43 |
use Koha::Cache::Object; |
44 |
|
44 |
|
Lines 325-331
sub get_from_cache {
Link Here
|
325 |
# Or if we do not need to deep copy |
325 |
# Or if we do not need to deep copy |
326 |
return $L1_cache{$key} |
326 |
return $L1_cache{$key} |
327 |
if not ref $L1_cache{$key} or $unsafe; |
327 |
if not ref $L1_cache{$key} or $unsafe; |
328 |
return clone $L1_cache{$key}; |
328 |
return dclone $L1_cache{$key}; |
329 |
} |
329 |
} |
330 |
|
330 |
|
331 |
my $get_sub = $self->{ref($self->{$cache}) . "_get"}; |
331 |
my $get_sub = $self->{ref($self->{$cache}) . "_get"}; |
332 |
- |
|
|