X-Git-Url: http://git.rot13.org/?p=Fuse-DBI;a=blobdiff_plain;f=DBI.pm;h=c94a5e3e84d40f1fd346d3894fb3d8086df72fab;hp=406db385c8397590694663d67cec46c6df50df3f;hb=258e57966734da73223b72d0048e613ad0b38703;hpb=17f71d3ea4691a9575688d5943c780e7361f550f diff --git a/DBI.pm b/DBI.pm index 406db38..c94a5e3 100755 --- a/DBI.pm +++ b/DBI.pm @@ -364,7 +364,8 @@ sub read_content { $sth->{'read'}->execute($id) || die $sth->{'read'}->errstr; $files{$file}{cont} = $sth->{'read'}->fetchrow_array; - $files{$file}{ctime} = time(); + # I should modify ctime only if content in database changed + #$files{$file}{ctime} = time() unless ($files{$file}{ctime}); print "file '$file' content [",length($files{$file}{cont})," bytes] read in cache\n"; } @@ -410,6 +411,7 @@ sub clear_cont { print "invalidate all cached content\n"; foreach my $f (keys %files) { delete $files{$f}{cont}; + delete $files{$f}{ctime}; } print "begin new transaction\n"; #$dbh->begin_work || die $dbh->errstr; @@ -524,7 +526,7 @@ C website L Example for WebGUI which comes with this distribution in -directory L. It also contains a lot of documentation +directory C. It also contains a lot of documentation about design of this module, usage and limitations. =head1 AUTHOR