Debugging adventures in Rack-land
summary
A Rails settings page shows the wrong unit until the page is refreshed twice because a request-level cache keeps stale athlete objects. Debugging uses Pry, bundle show/open and inspecting the Rack middleware stack to discover that a request-level cache is cleared via a body proxy close but Rack::ETag drops close by consuming body parts to compute a digest, preventing the clear. Workarounds: upgrade Rack where the bug is fixed, insert the cache middleware before ETag, or clear the cache before the request.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:38Debugging Adventures in Rack-land
- 1:19STRAVA
- 7:24How do we clear the cache in web requests?
- 7:38Each request needs a fresh cache.
- 8:31What makes an HTTP response?
- 15:27Rack + Rack Middleware
- 29:27Hooks that manage the underlying middleware complexity for you.








