Skip to content

Commit

Permalink
use last_modified in example too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 26, 2015
1 parent 1712764 commit e8467c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -352,8 +352,8 @@ Check freshness of request by comparing the C<If-None-Match> and
C<If-Modified-Since> request headers to the C<ETag> and C<Last-Modified>
response headers with L<Mojolicious::Static/"is_fresh">.
# Add ETag header and check freshness before rendering
$c->is_fresh(etag => 'abc')
# Add ETag/Last-Modified headers and check freshness before rendering
$c->is_fresh(etag => 'abc', last_modified => 1424985708)
? $c->rendered(304)
: $c->render(text => 'I ♥ Mojolicious!');
Expand Down

0 comments on commit e8467c6

Please sign in to comment.