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. ...@@ -432,13 +432,9 @@ encountered an error.
Example:: Example::
import std; # A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
# Log a message if the file has not been updated within the last set resp.http.Last-Modified = rdr.mtime();
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
.. _xreader.next_check(): .. _xreader.next_check():
......
...@@ -394,13 +394,9 @@ encountered an error. ...@@ -394,13 +394,9 @@ encountered an error.
Example:: Example::
import std; # A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
# Log a message if the file has not been updated within the last set resp.http.Last-Modified = rdr.mtime();
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
$Method DURATION .next_check() $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