Open incheoloh opened 1 week ago
The following configuration works as I wanted it to. It would be better if there was a secondary specification called 'status' in the cache.config file. (e.g dest_domain=example.com status=403 ttl-in-cache=60s)
If the default TTL is set to 1 day and negative response is set to 60 seconds Cache-Control and Cache.config are not configured.
records.yaml
proxy.config.http.cache.heuristic_min_lifetime : 86400
proxy.config.http.cache.heuristic_max_lifetime : 86400
proxy.config.http.negative_caching_enabled : 1
proxy.config.http.negative_caching_lifetime : 60
cache.config
records.yaml
ttl-in-cache in cache.config sets a default TTL, applying this duration to cached responses regardless of the response code. proxy.config.http.negative_caching_lifetime in records.yaml is intended to set the TTL for negative responses (e.g., 403, 404). However, if ttl-in-cache is defined in cache.config, it takes precedence and applies a TTL of 20 seconds to all responses, including 403.
Is there any way to use the value set by proxy.config.http.negative_caching_lifetime instead of the ttl set by ttl-in-cache for negative responses?