Maxim Dounin
January 06, 2019 09:48PM
Hello!

On Sun, Jan 06, 2019 at 03:07:00PM +0200, Andrei wrote:

> I was wondering how can I force cache of a $request_uri (/abc) for 10
> minutes, but set the browser expires headers for 5 minutes?

The most basic options are:

- You can set Expires from your backend as desired for browser
caching, and use the X-Accel-Expires header to set caching time
for nginx (see http://nginx.org/r/proxy_cache_valid).

- You can configure nginx to ignore Expires and Cache-Control as
set by your backend (see http://nginx.org/r/proxy_ignore_headers),
so these will be used only by browsers, and set caching time for
nginx manually with proxy_cache_valid (see
http://nginx.org/r/proxy_cache_valid).

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cache vs expires time

Andrei January 06, 2019 08:08AM

Re: Cache vs expires time

Maxim Dounin January 06, 2019 09:48PM

Re: Cache vs expires time

Andrei January 08, 2019 02:46AM

Re: Cache vs expires time

Andrei January 08, 2019 02:56AM

Re: Cache vs expires time

Maxim Dounin January 09, 2019 12:02PM

Re: Cache vs expires time

Andrei January 10, 2019 03:34AM

Re: Cache vs expires time

Maxim Dounin January 10, 2019 08:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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