Skip to content

fix: clear Electron HTTP cache on startup to prevent stale frontend#451

Merged
yondonfu merged 1 commit intomainfrom
fix/electron-stale-cache
Feb 12, 2026
Merged

fix: clear Electron HTTP cache on startup to prevent stale frontend#451
yondonfu merged 1 commit intomainfrom
fix/electron-stale-cache

Conversation

@yondonfu
Copy link
Copy Markdown
Contributor

@yondonfu yondonfu commented Feb 12, 2026

Summary

  • Clears Chromium's HTTP session cache at the start of app.on('ready') before any window creation or frontend loading
  • Prevents stale frontend assets from being served after app updates, since the cache in %APPDATA%/daydream-scope/ persists across updates
  • Single-line addition: await session.defaultSession.clearCache()

Test plan

  • Build packaged app (npm run dist:win), run it, confirm it starts correctly
  • Verify no regressions in the setup/loading flow

🤖 Generated with Claude Code

Chromium's HTTP cache persists in the user's app data directory across
app updates. This can cause the Electron app to serve stale frontend
assets after an update. Clearing the session cache on startup ensures
fresh assets are always fetched from the Python backend.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Yondon Fu <[email protected]>
@yondonfu yondonfu merged commit 4a60325 into main Feb 12, 2026
6 checks passed
@yondonfu yondonfu deleted the fix/electron-stale-cache branch February 12, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant