cache: Serve Range GET from disk when present #44
Reference in New Issue
Block a user
Delete Branch "moss/cache-range-from-disk"
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
Steam clients lean on Range requests. Cache hit/miss could look healthy while downloads still felt cold: a Range miss stripped Range for the upstream fetch (correct for full-object caching) but then wrote the full body back to the client as 200 instead of a 206 slice.
What
streamCachedResponsepath) and countrange_cacherange_upstream/metricsemitsrange_cache/range_upstream(snake_case)Same cache stack; no second cache. Out of scope: HEAD (#31), partial-object write protocols.
Test
go test ./...(jumpbox;makenot installed in non-interactive PATH)steamcache/range_test.go: Range HIT local 206 + no upstream re-fetch + metrics; Range MISS 206 + full object cached + metrics;/metricstext emission; focusedstreamCachedResponse206/416Risks
Rollback
Revert this PR / branch tip on
develop.Fixes #38