Skip to content

fix(updates): fetch the changelog past the device's HTTP cache so a just-pushed entry opens - #150

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/changelog-feed-cache
Dec 4, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/changelog-feed-cache

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

What

A changelog push for a brand-new entry opened Update not found, and the Updates list didn't show the entry either, even though appwrite.io was already serving it (reported for 2026-12-04, pushed at 12:00 UTC, website serving it since ~11:51).

Why

Expo SDK 58 replaces the global fetch with expo/fetch, which ignores the cache option, so { cache: 'no-cache' } in listUpdates did nothing. The feed is served with Cache-Control: public, max-age=3600, so iOS answered every request for changelog.json from the copy it already had, for up to an hour. The detail screen's 5-second retries, the push's invalidateQueries and pull-to-refresh all got that old copy.

The fix asks for changelog.json?_=<now>, so each request reaches the website.

Reproduction

Release build on the iOS simulator, with the app holding a feed without the entry and a local server (with appwrite.io's exact Cache-Control) serving the feed with it:

Flow Before After
App killed, push tapped Update not found, 14 fetches, 0 reached the server Entry opens, request reaches the server
App in background, push tapped Update not found, 0 reached the server not re-run, same code path
App open, push tapped Update not found, 15 fetches, 0 reached the server not re-run, same code path
Pull-to-refresh on Updates List without the entry, 0 reached the server New entry listed, request reaches the server

A development build doesn't reproduce it: every request reaches the server there.

Before After

Release

JavaScript only, so it can ship to 0.25.1 installs as an EAS Update.

…ust-pushed entry opens

Expo's fetch ignores the cache option, so the feed's one-hour max-age let iOS answer every refetch from the copy it already had. A push for a new entry then opened Update not found and the list stayed without it. A unique URL per request reaches the website.
@appwrite

appwrite Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Code review

Commit Status Tier Verdict Details
091affc Reviewed Reviewed 🟢 S · Ready to merge ✅ Approved View review

listUpdates now appends a timestamp query parameter to the changelog feed URL. This gives each fetch a distinct URL so device HTTP caches do not reuse the stale feed after a push or refresh.

Walkthrough (1)
File Change
src/updates/api.ts Added a timestamp cache-buster to changelog feed requests and clarified why it is needed.

Reviewed 091affc

Tip

Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 3c747dd into main Dec 4, 2026
7 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/changelog-feed-cache branch December 4, 2026 15:31
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