gabriel / musehub public
fix BREAKING cache task/cache-fix-releases #1 / 1
gabriel · 172 days ago · Apr 9, 2026 · Diff

fix(cache): add no-store for /releases/ error responses

Cloudflare was caching 404s from /releases/ with its default 14400s TTL because the app sent no Cache-Control header. Any miss (e.g. accessing a tarball URL before the file was uploaded) would poison the edge cache for 4 hours, breaking installs.

Fix: extend StaticCacheMiddleware to cover /releases/ paths — 200 responses get max-age=3600 (1 hour), non-2xx get no-store so Cloudflare never caches missing-file errors.

sha256:d185e332615b137e4d88ade84f308c3aff9998f678df8ad7e29afb80464a2870 sha
+2 ~2 −1 symbols
sha256:095765f04b98a3afc3505ff838234faa43f95a374f85dad84aedfff83c3a9b09 snapshot
+2
symbols added
~2
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 5 symbols
~ musehub/middleware/static_cache.py .py 2 symbols added, 1 symbol removed, 2 symbols modified
− Callable import import Callable L17–17
+ _NO_STORE variable variable _NO_STORE L22–22
+ _ONE_HOUR variable variable _ONE_HOUR L21–21
← Older Oldest on task/cache-fix-releases
All commits
Newer → Latest on task/cache-fix-releases

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:d185e332615b137e4d88ade84f308c3aff9998f678df8ad7e29afb80464a2870 --body "your comment"