Welcome! Log In Create A New Profile

Advanced

proxy_cache min/max TTL

Eloy Coto Pereiro
September 10, 2019 11:42AM
Hi,

Last week I was playing with Nginx proxy caching, and I have the following
questions regarding some changes that I would like to introduce.

At the moment, the cache always uses the `Cache-control: max-age=60` or
other
headers, but there is no way to say in a request that the maximum time is
15seconds for example.

I would like to introduce a new parameter called `proxy_cache_max_ttl` and
`proxy_cache_min_ttl` where the TTL can be defined in a variable and if
the
cache-control is bigger (or smaller) than that will be overwritten. If min
is
set and no header, the cache will be set to this value.

The changes will happen on `ngx_http_upstream_process_header` function, but
I'm
not sure if this change will be accepted.

Do these changes make sense for Nginx? Any reason why these changes will not
accept? Can this be achieved in any other way?

Regards.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

proxy_cache min/max TTL

Eloy Coto Pereiro 44 September 10, 2019 11:42AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready