Welcome! Log In Create A New Profile

Advanced

Nginx Cache | @ prefix example

May 12, 2018 12:05AM
So it says this on the docs : http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid

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 clarification.

http://www.networkflare.com/
Subject Author Posted

Nginx Cache | @ prefix example

c0nw0nk May 12, 2018 12:05AM

Re: Nginx Cache | @ prefix example

Francis Daly May 16, 2018 06:44PM

Re: Nginx Cache | @ prefix example

c0nw0nk May 17, 2018 12:50AM

Re: Nginx Cache | @ prefix example

Francis Daly May 17, 2018 03:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready