From 6f75dd2839cc76e01141ef547e8b0e80cdbd4c87 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 27 Oct 2011 17:37:06 -0400 Subject: [PATCH] Tpac: clear the per-process cache of org-unit settings on each page load Any time saved is not worth the confusion of changes to org unit settings not taking effect in the TPAC without an apache restart, or worse, taking effect for some page loads but not others. Actually authored by Bill. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 3b72dbc556..af027e3c6c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -21,6 +21,10 @@ sub init_ro_object_cache { my $e = $self->editor; my $ctx = $self->ctx; + # reset org unit setting cache on each page load to avoid the + # requirement of reloading apache with each org-setting change + $cache{org_settings} = {}; + if($ro_object_subs) { # subs have been built. insert into the context then move along. $ctx->{$_} = $ro_object_subs->{$_} for keys %$ro_object_subs; -- 2.11.0