From: miker Date: Sat, 17 Jan 2009 16:12:16 +0000 (+0000) Subject: segregate status cache by locale (though perhaps they should not be cached at all) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ac83b3f62ba3e21e53fad4095d5859838375f478;p=Evergreen.git segregate status cache by locale (though perhaps they should not be cached at all) git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11869 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index aa5824cbf4..b0f0066be9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -1276,11 +1276,12 @@ __PACKAGE__->register_method( method => "retrieve_all_copy_statuses", api_name => "open-ils.search.config.copy_status.retrieve.all" ); -my $copy_statuses; +my %copy_statuses; sub retrieve_all_copy_statuses { my( $self, $client ) = @_; - return $copy_statuses if $copy_statuses; - return $copy_statuses = + my $locale = $client->session->session_locale || 'en-US'; + return $copy_statuses{$locale} if $copy_statuses{$locale}; + return $copy_statuses{$locale} = new_editor()->retrieve_all_config_copy_status(); }