Welcome! Log In Create A New Profile

Advanced

Re: Can't get a simple proxy to cache anything

Maxim Dounin
January 23, 2021 10:16AM
Hello!

On Fri, Jan 22, 2021 at 04:47:07PM +0000, Phil Endecott wrote:

[...]

> So the proxy has successfully retrieved the file - but it has not been cached;
> there is nothing saved in /var/cache/nginx.
>
> Looking in the nginx debug log, I see this:
>
> 2021/01/22 16:25:38 [debug] 18695#18695: *18 http cacheable: 0
>
> So my guess is that something about the http request or response, or
> in the nginx configuration, has caused nginx to decide that this response
> is not cacheable.
>
> Can anyone see what the problem is?

You haven't configured any proxy_cache_valid directives (see
http://nginx.org/r/proxy_cache_valid for details), and the
response doesn't have any cache validity headers, such as
"Expires" or "Cache-Control: max-age=...".

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

Can't get a simple proxy to cache anything

Phil Endecott January 22, 2021 11:48AM

Re: Can't get a simple proxy to cache anything

Maxim Dounin January 23, 2021 10:16AM

Re: Can't get a simple proxy to cache anything

Phil Endecott January 24, 2021 07:58AM

Re: Can't get a simple proxy to cache anything

Maxim Dounin January 25, 2021 11:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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