/[webpac2]/trunk/lib/WebPAC/Store.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Store.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1082 by dpavlin, Mon Sep 3 15:26:46 2007 UTC revision 1083 by dpavlin, Sun Dec 23 19:41:10 2007 UTC
# Line 199  sub load_lookup { Line 199  sub load_lookup {
199          }          }
200    
201          if (my $data = retrieve($path)) {          if (my $data = retrieve($path)) {
202                  $log->info("loaded lookup $path");                  $log->info("loaded lookup $path ", -s $path, " bytes");
203                  return $data;                  return $data;
204          } else {          } else {
205                  $log->logwarn("can't load lookup $database/", $args->{input}, "/", $args->{key}, " from $path: $!");                  $log->logwarn("can't load lookup $database/", $args->{input}, "/", $args->{key}, " from $path: $!");
# Line 243  sub save_lookup { Line 243  sub save_lookup {
243          my $t = time();          my $t = time();
244    
245          if (store $args->{data}, $path) {          if (store $args->{data}, $path) {
246                  $log->info(sprintf("saved lookup $path in %.2fs", time() - $t));                  $log->info(sprintf("saved lookup %s %d bytes in %.2fs", $path, -s $path, time() - $t));
247                  return 1;                  return 1;
248          } else {          } else {
249                  $log->logwarn("can't save lookup to $path: $!");                  $log->logwarn("can't save lookup to $path: $!");

Legend:
Removed from v.1082  
changed lines
  Added in v.1083

  ViewVC Help
Powered by ViewVC 1.1.26