From 472d436eda5ed276bba3a52aee79bb37bf02fc51 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 27 Aug 2018 12:08:37 -0400 Subject: [PATCH] LP#1786987: Locale-less org tree cache object becomes stale The autogen.sh script calls a function that flushes all org tree objects cached by locale, but does not flush the one used when the locale is unkown. This commit forces that flushing to occur. berick: Definition of my $cache pushed up above first use. Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm index 4bd5b3a8fd..351a129643 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm @@ -88,9 +88,12 @@ sub org_tree_js { # Get our list of locales my $locales = get_locales(); + # Remove the no-locale copy + my $cache = OpenSRF::Utils::Cache->new; + $cache->delete_cache("orgtree."); + foreach my $locale (@$locales) { warn "removing OrgTree from the cache for locale " . $locale->code . "...\n"; - my $cache = OpenSRF::Utils::Cache->new; $cache->delete_cache("orgtree.".$locale->code); # fetch the org_unit's and org_unit_type's -- 2.43.2