From dfadaa45aa8ce226d9ba111ebad6e44271e39e41 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 7 Sep 2018 07:50:13 +0200 Subject: [PATCH] Bug 17530: (QA follow-up) Fix caching error The fourth patch made this change: - $last_article_requestable_guesses->{$key} = $res; + $cache->set_in_cache(GUESSED_ITEMTYPES_KEY, $res); This removed the category level in the cached hash. Adding it back here. Signed-off-by: Marcel de Rooy Tested by verifying cached values, running opac-search with anonymous session as well as user context. Signed-off-by: Nick Clemens --- Koha/IssuingRules.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/IssuingRules.pm b/Koha/IssuingRules.pm index 9ec3ee5450..608b4edeed 100644 --- a/Koha/IssuingRules.pm +++ b/Koha/IssuingRules.pm @@ -182,7 +182,8 @@ sub guess_article_requestable_itemtypes { foreach my $rule ( $rules->as_list ) { $res->{ $rule->itemtype } = 1; } - $cache->set_in_cache(GUESSED_ITEMTYPES_KEY, $res); + $last_article_requestable_guesses->{$key} = $res; + $cache->set_in_cache(GUESSED_ITEMTYPES_KEY, $last_article_requestable_guesses); return $res; } -- 2.39.5