Welcome! Log In Create A New Profile

Advanced

Reverse proxy caching for dynamic content

May 15, 2019 03:57AM
Nginx will not cache content when max-age=0 although I believe this should be standard in combination with must-revalidate.

I want to cache dynamic content, so every request needs to be revalidated. This way when I get multiple fresh GET requests for an expensive resource, Nginx can revalidate with the backend that only needs to generate a 304's and the full content can be served to the clients.

I can get close to what I want by ignoring the header "Cache-Control: max-age=0, public, must-revalidate" and setting proxy_cache_valid to 1s. Unfortunately even 1s is too long for some situations.

Is there a way to cache content and mark it as stale immediately or always revalidate on the next hit?
Subject Author Posted

Reverse proxy caching for dynamic content

flierps May 15, 2019 03:57AM

Re: Reverse proxy caching for dynamic content

Patrick May 15, 2019 04:44AM

Re: Reverse proxy caching for dynamic content

flierps May 15, 2019 07:10AM

Re: Reverse proxy caching for dynamic content

Patrick May 15, 2019 11:38PM

Re: Reverse proxy caching for dynamic content

flierps May 16, 2019 12:59AM

Re: Reverse proxy caching for dynamic content

Patrick May 16, 2019 01:12AM

Re: Reverse proxy caching for dynamic content

flierps May 16, 2019 01:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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