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 <m.de.rooy@rijksmuseum.nl>
Tested by verifying cached values, running opac-search with anonymous
session as well as user context.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2018-09-07 07:50:13 +02:00 committed by Nick Clemens
parent d6424c1999
commit dfadaa45aa
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}