remove eval{} from caching code
This commit is contained in:
parent
841e9d5784
commit
165be5b389
22 changed files with 59 additions and 59 deletions
|
|
@ -350,7 +350,7 @@ around BUILDARGS => sub {
|
|||
}
|
||||
}
|
||||
|
||||
my $properties = eval{$session->cache->get("asset".$assetId.$revisionDate)};
|
||||
my $properties = $session->cache->get("asset".$assetId.$revisionDate);
|
||||
unless (exists $properties->{assetId}) { # can we get it from cache?
|
||||
my $sql = "select * from asset";
|
||||
my $where = " where asset.assetId=?";
|
||||
|
|
@ -368,7 +368,7 @@ around BUILDARGS => sub {
|
|||
$session->errorHandler->error("Asset $assetId $className $revisionDate is missing properties. Consult your database tables for corruption. ");
|
||||
return undef;
|
||||
}
|
||||
eval{ $session->cache->set("asset".$assetId.$revisionDate, $properties, 60*60*24) };
|
||||
$session->cache->set("asset".$assetId.$revisionDate, $properties, 60*60*24);
|
||||
}
|
||||
|
||||
if (defined $properties) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue