Bug 16221: follow-up for changes made by bug 16229
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 8 Apr 2016 12:37:46 +0000 (13:37 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 10:39:48 +0000 (10:39 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Cache.pm

index 95ae9e0..7793f06 100644 (file)
@@ -269,7 +269,7 @@ sub set_in_cache {
     my $set_sub = $self->{ref($self->{$cache}) . "_set"};
 
     # Deep copy if it's not a scalar and unsafe is not passed
-    $value = clone( $value ) if ref($value) and not $unsafe;
+    $value = dclone( $value ) if ref($value) and not $unsafe;
 
     # Set in L1 cache
     $L1_cache{ $key } = $value;
@@ -338,7 +338,7 @@ sub get_from_cache {
     # Otherwise the L1 cache won't ever be populated
     $L1_cache{$key} = $value;
 
-    $value = clone $value if ref $L1_cache{$key} and not $unsafe;
+    $value = dclone $value if ref $L1_cache{$key} and not $unsafe;
 
     return $value;
 }