From 4965f481915be92eecca17c5d3c6189fc491dffc Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 24 Mar 2010 14:16:44 +0000 Subject: [PATCH] for added security, allow for the configuration of a separate cache server for the anonymous cache to prevent filling up the main cache with anon data git-svn-id: svn://svn.open-ils.org/ILS/trunk@15944 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/opensrf.xml.example | 9 +++++++++ Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index 6231ae65e..951f194d1 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -282,6 +282,15 @@ vim:et:ts=4:sw=4: 86400 + + + + localhost:11211 + + 1800 + + 102400 + diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm index 12079d0c3..e9d04410e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm @@ -578,9 +578,9 @@ sub anon_cache { my($self, $conn, $ses_key, $field_key, $value) = @_; my $sc = OpenSRF::Utils::SettingsClient->new; - my $cache = OpenSRF::Utils::Cache->new('global'); - my $cache_timeout = $sc->config_value(cache => global => 'max_anon_cache_time') || 1800; # 30 minutes - my $cache_size = $sc->config_value(cache => global => 'max_anon_cache_size') || 102400; # 100k + my $cache = OpenSRF::Utils::Cache->new('anon'); + my $cache_timeout = $sc->config_value(cache => anon => 'max_cache_time') || 1800; # 30 minutes + my $cache_size = $sc->config_value(cache => anon => 'max_cache_size') || 102400; # 100k if($self->api_name =~ /delete_session/) { -- 2.11.0