Nginx Cache | @ prefix example

c0nw0nk nginx-forum at
Sat May 12 04:05:51 UTC 2018

So it says this on the docs :

The “X-Accel-Expires” header field sets caching time of a response in
seconds. The zero value disables caching for a response. If the value starts
with the @ prefix, it sets an absolute time in seconds since Epoch, up to
which the response may be cached. 

Can someone give an example of how this should look and what if i set it as
zero what is the outcome then...?

//unknown outcome / result...?
X-Accel-Expires: @0

//Expire cache straight away.
X-Accel-Expires: 0

//Expire cache in 5 seconds
X-Accel-Expires: 5

//Expire cache in 5 seconds and allow "STALE" cache responses to be stored
for 5 seconds ?????
X-Accel-expires: @5 5

Hopefully I am right thinking that the above would work like this need some

Posted at Nginx Forum:,279762,279762#msg-279762

More information about the nginx mailing list