Skip to content

fix(app): reuse cached releases on launch and product switch#516

Merged
p-linnane merged 1 commit into
mainfrom
fix/app-honor-cache-on-load
Jun 10, 2026
Merged

fix(app): reuse cached releases on launch and product switch#516
p-linnane merged 1 commit into
mainfrom
fix/app-honor-cache-on-load

Conversation

@p-linnane

Copy link
Copy Markdown
Member

refresh() always called dataProvider.clearCache() — which also clears the process-wide URLCache — before fetching, and it was the only load path: the initial .task, switchProduct, the toolbar button, and the alert retry all routed through it. So every launch re-downloaded all ~280/~130 release files (defeating the API's stale-while-revalidate disk cache), and toggling macOS↔Xcode re-fetched the entire catalog each time even though DataProvider's cache is product-keyed specifically so both products can coexist.

This splits a cache-honoring load() (used by the initial .task and switchProduct) from refresh() (clearCache + load, kept for the explicit ⌘R command and the retry button). Product switches and warm launches now serve from cache; ⌘R still forces a fresh fetch. Built the app target to confirm it compiles. (The orphaned-Task race in switchProduct is a separate finding and not addressed here.)

refresh() always called dataProvider.clearCache() — which also wipes the
process-wide URLCache — before fetching, and it was the only load path:
the initial .task, switchProduct, the toolbar button, and the alert retry
all routed through it. So every launch re-downloaded all ~280/~130 release
files (defeating URLCache's stale-while-revalidate disk cache), and toggling
macOS↔Xcode re-fetched the whole catalog each time even though DataProvider's
cache is product-keyed precisely so both can coexist.

Split a cache-honoring load() (used by the initial .task and switchProduct)
from refresh() (clearCache + load, kept for the explicit ⌘R command and the
retry button). Product switches and warm launches now serve from cache.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@p-linnane p-linnane enabled auto-merge (squash) June 10, 2026 05:50
@p-linnane p-linnane merged commit 1607953 into main Jun 10, 2026
11 checks passed
@p-linnane p-linnane deleted the fix/app-honor-cache-on-load branch June 10, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant