mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Bypass HTTP cache when checking for new versions
The version check fetched latest.json without any cache directive. The server sends no Cache-Control header, so WebKit applied heuristic caching (RFC 9111 4.2.2): the response is considered fresh for 10% of the time since Last-Modified, which can be hours to days between releases. Apps checking for updates right after a release were served a stale latest.json from disk cache and concluded they were up to date. Dev builds use a separate cache, which is why the bug only appeared in release builds. Fetch with cache: "no-store" so every check hits the server.
This commit is contained in:
@@ -11,6 +11,7 @@ interface LatestVersionInfo {
|
||||
const fetchLatestVersion = async (): Promise<LatestVersionInfo> => {
|
||||
const response = await fetch(
|
||||
"https://files.radicle.dev/releases/radicle-desktop/latest/latest.json",
|
||||
{ cache: "no-store" },
|
||||
);
|
||||
const body: LatestVersionInfo = await response.json();
|
||||
return body;
|
||||
|
||||
Reference in New Issue
Block a user