Lines 283-289
sub set_in_cache {
Link Here
|
283 |
my $set_sub = $self->{ref($self->{$cache}) . "_set"}; |
283 |
my $set_sub = $self->{ref($self->{$cache}) . "_set"}; |
284 |
|
284 |
|
285 |
# Deep copy if it's not a scalar and unsafe is not passed |
285 |
# Deep copy if it's not a scalar and unsafe is not passed |
286 |
$value = clone( $value ) if ref($value) and not $unsafe; |
286 |
$value = dclone( $value ) if ref($value) and not $unsafe; |
287 |
|
287 |
|
288 |
# Set in L1 cache |
288 |
# Set in L1 cache |
289 |
$L1_cache{ $key } = $value; |
289 |
$L1_cache{ $key } = $value; |
Lines 352-358
sub get_from_cache {
Link Here
|
352 |
# Otherwise the L1 cache won't ever be populated |
352 |
# Otherwise the L1 cache won't ever be populated |
353 |
$L1_cache{$key} = $value; |
353 |
$L1_cache{$key} = $value; |
354 |
|
354 |
|
355 |
$value = clone $value if ref $L1_cache{$key} and not $unsafe; |
355 |
$value = dclone $value if ref $L1_cache{$key} and not $unsafe; |
356 |
|
356 |
|
357 |
return $value; |
357 |
return $value; |
358 |
} |
358 |
} |
359 |
- |
|
|