Commit 99720eea authored by Geoff Simmons's avatar Geoff Simmons

Change the .mtime() example to suggest setting the Last-Modified header.

parent 08b4fb35
......@@ -432,13 +432,9 @@ encountered an error.
Example::
import std;
# Log a message if the file has not been updated within the last
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
# A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
set resp.http.Last-Modified = rdr.mtime();
.. _xreader.next_check():
......
......@@ -394,13 +394,9 @@ encountered an error.
Example::
import std;
# Log a message if the file has not been updated within the last
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
# A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
set resp.http.Last-Modified = rdr.mtime();
$Method DURATION .next_check()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment