This commit is contained in:
Mateusz Gruszczyński committed 2026-10-10 00:18:06 +02:00
1 parent ad95bfb050
commit 1431dd47f0
62 files changed
+1360 -198

No files matched your search

+8 -1
View File
@@ -99,6 +99,7 @@ fn cache_revision(config: &config::Config) -> u64 {
cache.expose_hits = false;
cache.expose_cache_status = false;
cache.expose_resident_age = false;
cache.expose_only_hits = false;
cache.via_header = None;
// Resource-only transform controls decide how much optimization work may
// happen concurrently, but do not change the transformed representation.
@@ -108,12 +109,18 @@ fn cache_revision(config: &config::Config) -> u64 {
transform.preset = None;
transform.memory_budget_bytes = 0;
transform.max_inflight = 0;
// A per-vhost diagnostics override is also presentation-only and must not
// invalidate cached objects when switched from inherited to HIT-only.
let mut vhosts = config.vhosts.clone();
for vhost in &mut vhosts {
vhost.cache.expose_only_hits = None;
}
let encoded = serde_json::to_vec(&(
&cache,
&transform,
&config.headers,
&config.forwarding,
&config.vhosts,
&vhosts,
))
.expect("serializable cache compatibility view");
let digest = Sha256::digest(encoded);