From: Lebbeous Fogle-Weekley Date: Thu, 27 Oct 2011 21:37:06 +0000 (-0400) Subject: Tpac: clear the per-process cache of org-unit settings on each page load X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6f75dd2839cc76e01141ef547e8b0e80cdbd4c87;p=evergreen%2Fpines.git 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 --- 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;