remove eval{} from caching code
This commit is contained in:
parent
841e9d5784
commit
165be5b389
22 changed files with 59 additions and 59 deletions
|
|
@ -224,7 +224,7 @@ sub view {
|
|||
my $cache = $session->cache;
|
||||
my $cacheKey = $self->getWwwCacheKey('view');
|
||||
if (!$session->var->isAdminOn && $self->cacheTimeout > 10) {
|
||||
my $out = eval { $cache->get( $cacheKey ) };
|
||||
my $out = $cache->get( $cacheKey );
|
||||
return $out if $out;
|
||||
}
|
||||
my %var = %{$self->get};
|
||||
|
|
@ -247,7 +247,7 @@ sub view {
|
|||
$var{parameters} .= sprintf("id=%s", $self->getId);
|
||||
my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate});
|
||||
if (!$session->var->isAdminOn && $self->cacheTimeout > 10) {
|
||||
eval{ $cache->set( $cacheKey, $out, $self->get("cacheTimeout") ) };
|
||||
$cache->set( $cacheKey, $out, $self->get("cacheTimeout") );
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue