Welcome! Log In Create A New Profile

Advanced

Updating r->cache in ngx_http_upstream_process_cache_control()

Maksim Yevmenkin
July 26, 2024 04:16PM
Hello,

I would like to understand the rationale for updating
r->cache->valid_sec (and other fields in r->cache) in
ngx_http_upstream_process_cache_control().

It appears that ngx_http_upstream_process_cache_control() can be
called (via ngx_http_proxy_process_header()) in two scenarios: when
sending a cached response to the client, and when receiving a response
from the upstream server.

Obviously, calling ngx_http_upstream_process_cache_control() when
receiving a response from the upstream server is completely expected.
However, calling ngx_http_upstream_process_cache_control(), and more
specifically, modifying r->cache fields while sending a cached
(NGX_HTTP_CACHE_HIT and possibly others) response is not completely
clear to me.

Thanks!
Max
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Updating r->cache in ngx_http_upstream_process_cache_control()

Maksim Yevmenkin 225 July 26, 2024 04:16PM



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

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready