Nginx Cache | @ prefix example
francis at daoine.org
Thu May 17 07:14:09 UTC 2018
On Thu, May 17, 2018 at 12:50:10AM -0400, c0nw0nk wrote:
> Thank you for the response and useful information Francis incredibly
> My webapp outputting the X-Accel-Expires header is PHP like so.
> echo(gmdate('D, d M Y H:i:s', 0) . ' GMT');
> Thu, 01 Jan 1970 00:00:00 GMT
> The 0 would be replaced by the time function what is a UNIX time stamp.
A unix time stamp is "absolute time in seconds since Epoch".
That is: it is a single number, probably 10 digits long for anything
Right now, it is:
$ date +%s
So if you want to set the expiry time of "in about an hour", you could
send a header of
where that timestamp corresponds to
$ date -u -d @1526544000
Thu May 17 08:00:00 UTC 2018
The X-Accel-Expires header should have a single value: either digits,
or an @ followed by digits.
Francis Daly francis at daoine.org
More information about the nginx