From: miker Date: Tue, 12 Apr 2005 14:45:44 +0000 (+0000) Subject: error checking in Cache.pm X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1f5273853c3031279e4f852ce91ed8bd6fc995c3;p=opensrf%2Fbjwebb.git error checking in Cache.pm git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@273 9efc2488-bf62-4759-914b-345cdb29e865 --- 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"}) {