LP#1786987: Locale-less org tree cache object becomes stale user/miker/lp-1786987-remove-no_locale-org-tree-cache
authorMike Rylander <mrylander@gmail.com>
Mon, 27 Aug 2018 16:08:37 +0000 (12:08 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 27 Aug 2018 16:08:37 +0000 (12:08 -0400)
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.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm

index 4bd5b3a..026c78d 100644 (file)
@@ -88,6 +88,9 @@ sub org_tree_js {
     # Get our list of locales
     my $locales = get_locales();
 
+    # Remove the no-locale copy
+    $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;