From 1f5273853c3031279e4f852ce91ed8bd6fc995c3 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 12 Apr 2005 14:45:44 +0000 Subject: [PATCH] error checking in Cache.pm git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@273 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Utils/Cache.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/perlmods/OpenSRF/Utils/Cache.pm b/src/perlmods/OpenSRF/Utils/Cache.pm index 91ea8f1..e972ae7 100644 --- a/src/perlmods/OpenSRF/Utils/Cache.pm +++ b/src/perlmods/OpenSRF/Utils/Cache.pm @@ -70,8 +70,7 @@ sub new { my $conf = OpenSRF::Utils::SettingsClient->new; my $servers = $conf->config_value( cache => $cache_type => servers => 'server' ); - my $expire_time = $conf->config_value( cache => $cache_type => servers => 'max_cache_time' ); - + my $expire_time = $conf->config_value( cache => $cache_type => 'max_cache_time' ); my $self = {}; $self->{persist} = $persist || 0; @@ -97,7 +96,8 @@ sub put_cache { $expiretime ||= $max_persist_time; - $self->{memcache}->set( $key, $value, $expiretime ); + $self->{memcache}->set( $key, $value, $expiretime ) || + throw OpenSRF::EX::ERROR ("Unable to store $key => $value in memcached server" );; if($self->{"persist"}) { -- 2.11.0