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 342-348
sub get_from_cache {
Link Here
|
342 |
# Or if we do not need to deep copy |
342 |
# Or if we do not need to deep copy |
343 |
return $L1_cache{$key} |
343 |
return $L1_cache{$key} |
344 |
if not ref $L1_cache{$key} or $unsafe; |
344 |
if not ref $L1_cache{$key} or $unsafe; |
345 |
return clone $L1_cache{$key}; |
345 |
return dclone $L1_cache{$key}; |
346 |
} |
346 |
} |
347 |
|
347 |
|
348 |
my $get_sub = $self->{ref($self->{$cache}) . "_get"}; |
348 |
my $get_sub = $self->{ref($self->{$cache}) . "_get"}; |
349 |
- |
|
|