cache: Key by depot path across CDN host aliases (#48)
CI / vulncheck (push) Successful in 14s
CI / check-and-test (push) Successful in 41s
Release Tag / release (push) Successful in 15s

Cache key from Path only; Host aliases share one entry. Closes #39.
This commit was merged in pull request #48.
This commit is contained in:
2026-09-07 15:18:26 -05:00
3 changed files with 143 additions and 3 deletions
+2
View File
@@ -89,6 +89,8 @@ curl -s -i http://localhost/lancache-heartbeat
A first pass through new content is mostly misses (`hit_rate` near 0). Repeat the same content and `cache_hits` / `hit_rate` should rise.
Cache entries are keyed by depot object path (not the CDN `Host` header), so when Steam rotates CDN hostnames for the same depot path, hits still climb across the aliases.
Steam clients lean on Range requests. When an object is already cached, a Range GET is served locally as 206 from that full object (`range_cache`). On a Range miss the cache still fetches and stores the full upstream body, then returns the requested byte range as 206 (`range_upstream`).
To confirm the process is up (HTTP 204 and `X-LanCache-Processed-By: SteamCache2`):