Changeset 57 in bookmarks for trunk/Bookmarks.pm


Ignore:
Timestamp:
08/16/13 00:09:23 (11 years ago)
Author:
peter
Message:
  • include a Last-Modified header in the HTML list and individual bookmark view
  • added a get_last_modified_time() method to Bookmarks that return the time of the most recently modified bookmark
  • for the individual bookmark view, check the Is-Modified-Since header and return a 304 response if the bookmark is unchanged
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bookmarks.pm

    r52 r57  
    169169    $sth->execute(@bind); 
    170170    return @{ $sth->fetchall_arrayref({}) }; 
     171} 
     172 
     173sub get_last_modified_time { 
     174    my $self = shift; 
     175    my $sth = $self->dbh->prepare('select mtime from bookmarks order by mtime desc limit 1'); 
     176    $sth->execute; 
     177    my ($mtime) = $sth->fetchrow_array; 
     178    return $mtime; 
    171179} 
    172180 
Note: See TracChangeset for help on using the changeset viewer.