Bug 16044: Add deep cloning
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Mar 2016 16:17:32 +0000 (16:17 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 16 Jun 2016 11:44:41 +0000 (13:44 +0200)
commitacb6f4ba41df93dccc3a715b74f12d866e97c890
treec0b40908074a496cdd83988a31586a5cdee9ff7b
parent0f082e6583aba50835c1c688599d510e117b2f20
Bug 16044: Add deep cloning

To avoid the cache to be modified unfortunately, the default behavior of
get_from_cache will be to deep copy if we are getting a structure.
If the item is a scalar, it's simply returned.

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 2e0af6e6df279aa08603e9696d35fc7def7bd7d3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Koha/Cache.pm