Welcome! Log In Create A New Profile

Advanced

Re: Client Cache Time vs. Server Cache Time

Maxim Dounin
July 11, 2012 11:32AM
Hello!

On Wed, Jul 11, 2012 at 09:15:53AM -0400, WarrickF wrote:

> Hi Guys,
>
> I'd like to setup a reverse proxy that functions as follows.
>
> Servers responds telling the client to cache content for 1 hour, but a
> the same time tells Nginx to cache the content for 24 hours.
>
> Every hour client still re-request content but it's served from cache.
>
> If something changes on the origin servers I can still dump the cache on
> Nginx, which will get a fresh copy.
>
> Is something like this currently supported?

Yes.

1) Instruct nginx to ignore Cache-Control / Expires headers you
use to control expiration on client.

2) Either use explicit expiration set by proxy_cache_valid, or use
X-Accel-Expires header to control expiration from backend.

See here for more details:

http://nginx.org/r/proxy_ignore_headers
http://nginx.org/r/proxy_cache_valid

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Client Cache Time vs. Server Cache Time

WarrickF July 11, 2012 09:15AM

Re: Client Cache Time vs. Server Cache Time

Maxim Dounin July 11, 2012 11:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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