chore(routes): enforce no-cache policy on agent-updatable file routes#317
Merged
Conversation
Live-updates regressions on 2026-05-18 traced to browser/CDN caching of
icons, canvas-page media, workspace files, and uploads. Adds explicit
Cache-Control/Pragma/Expires + CDN-Cache-Control no-store headers to
the four routes that serve agent-updatable content:
- routes/canvas.py — canvas-pages non-HTML media (was max_age=3600)
- routes/icons.py — Lucide icon library (agents may swap icons)
- routes/static_files.py — /uploads/ (excludes known_faces, which has its
own route)
- routes/workspace.py — workspace raw file endpoint
conditional=True and Accept-Ranges are preserved so audio/video streaming
still works correctly. Reasoning, scope, and rollback live in
docs/jambot/no-cache-policy.md (committed separately to the MIKE-AI ops
repo).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds explicit
Cache-Control: no-cache, no-store, must-revalidate+CDN-Cache-Control: no-storeheaders to the four routes that serve agent-updatable content. Fixes live-updates regressions where icon swaps / canvas-page media / workspace files / upload edits weren't visible until a hard refresh.Scope:
routes/canvas.py— canvas-pages non-HTML media (previouslymax_age=3600+ CDN cache; nowno-storeend-to-end)routes/icons.py— Lucide icon library endpointroutes/static_files.py—/uploads/<path>(known_faces excluded — has its own route)routes/workspace.py— workspace raw file endpointStreaming preserved:
conditional=TrueandAccept-Ranges: bytesstay in place, so audio/video range requests still work for playback.Reasoning
OpenVoiceUI is a live agentic surface — agents/admins continuously write canvas pages, icons, generated images, workspace files, JSON state. Cached responses defeat the "live updates always visible" guarantee. Full policy doc (Mike's verbatim rule, scope, exceptions, rollback) lives at
docs/jambot/no-cache-policy.mdin the MIKE-AI ops repo.Rollback
Single commit —
git revert 97f3d3ereverts all 4 file changes atomically. Each route's prior cache behavior is restored exactly (the diff only adds headers + drops onemax_age=3600fromcanvas.py).