cache: Short TTL negative cache for 404/410 depot objects #50
Reference in New Issue
Block a user
Delete Branch "cache/negative-ttl-404"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A 404/410 depot chunk was re-fetched on every miss, hammering Steam for definitive gone objects while looking like normal cache misses.
What changed
expires-unixfield; positives stay 3-field)./metricscounternegative_cache_hits(also still counts ascache_hits).cache.negative_ttl(Go duration, default5m;0/0sdisables storing).How tested
go test -count=1 ./steamcache/ ./config/on jumpbox (pass)TestNegativeCache404: first 404 hits upstream once; second within TTL does not;negative_cache_hitspresentRisks / rollback
cache.negative_ttl: 0s.Fixes #40
Waterfall
Produced by xAI grok (waterfall step 1:
grok -p --effort medium).