[open-ils-commits] r15944 - in trunk/Open-ILS: examples src/perlmods/OpenILS/Application/Actor (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 24 10:16:46 EDT 2010
Author: erickson
Date: 2010-03-24 10:16:44 -0400 (Wed, 24 Mar 2010)
New Revision: 15944
Modified:
trunk/Open-ILS/examples/opensrf.xml.example
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
Log:
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
Modified: trunk/Open-ILS/examples/opensrf.xml.example
===================================================================
--- trunk/Open-ILS/examples/opensrf.xml.example 2010-03-24 03:11:33 UTC (rev 15943)
+++ trunk/Open-ILS/examples/opensrf.xml.example 2010-03-24 14:16:44 UTC (rev 15944)
@@ -282,6 +282,15 @@
</servers>
<max_cache_time>86400</max_cache_time>
</global>
+ <anon>
+ <!-- anonymous cache. currently, primarily used for web session caching -->
+ <servers>
+ <server>localhost:11211</server>
+ </servers>
+ <max_cache_time>1800</max_cache_time>
+ <!-- maximum size of a single cache entry / default = 100k-->
+ <max_cache_size>102400</max_cache_size>
+ </anon>
</cache>
<apps>
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm 2010-03-24 03:11:33 UTC (rev 15943)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm 2010-03-24 14:16:44 UTC (rev 15944)
@@ -578,9 +578,9 @@
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/) {
More information about the open-ils-commits
mailing list