/[fuse_dbi]/fuse-couchdb/DBI.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 /fuse-couchdb/DBI.pm

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

revision 28 by dpavlin, Fri Oct 8 23:43:06 2004 UTC revision 31 by dpavlin, Sun Oct 10 19:33:23 2004 UTC
# Line 364  sub read_content { Line 364  sub read_content {
364    
365          $sth->{'read'}->execute($id) || die $sth->{'read'}->errstr;          $sth->{'read'}->execute($id) || die $sth->{'read'}->errstr;
366          $files{$file}{cont} = $sth->{'read'}->fetchrow_array;          $files{$file}{cont} = $sth->{'read'}->fetchrow_array;
367          $files{$file}{ctime} = time();          # I should modify ctime only if content in database changed
368            #$files{$file}{ctime} = time() unless ($files{$file}{ctime});
369          print "file '$file' content [",length($files{$file}{cont})," bytes] read in cache\n";          print "file '$file' content [",length($files{$file}{cont})," bytes] read in cache\n";
370  }  }
371    
# Line 410  sub clear_cont { Line 411  sub clear_cont {
411          print "invalidate all cached content\n";          print "invalidate all cached content\n";
412          foreach my $f (keys %files) {          foreach my $f (keys %files) {
413                  delete $files{$f}{cont};                  delete $files{$f}{cont};
414                    delete $files{$f}{ctime};
415          }          }
416          print "begin new transaction\n";          print "begin new transaction\n";
417          #$dbh->begin_work || die $dbh->errstr;          #$dbh->begin_work || die $dbh->errstr;
# Line 524  C<FUSE (Filesystem in USErspace)> websit Line 526  C<FUSE (Filesystem in USErspace)> websit
526  L<http://sourceforge.net/projects/avf>  L<http://sourceforge.net/projects/avf>
527    
528  Example for WebGUI which comes with this distribution in  Example for WebGUI which comes with this distribution in
529  directory L<examples/webgui.pl>. It also contains a lot of documentation  directory C<examples/webgui.pl>. It also contains a lot of documentation
530  about design of this module, usage and limitations.  about design of this module, usage and limitations.
531    
532  =head1 AUTHOR  =head1 AUTHOR

Legend:
Removed from v.28  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26