From 49a02221d351a699c6648e59b622bf74ab29eaeb Mon Sep 17 00:00:00 2001 From: Strycher Date: Wed, 29 Jul 2026 23:22:28 -0400 Subject: [PATCH] =?UTF-8?q?docs(#404):=20correct=20cache-bust=20comment=20?= =?UTF-8?q?=E2=80=94=20raw.githubusercontent=20is=20exempt=20(#452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cache-bust helps federated catalogs on normal servers but does NOT defeat raw.githubusercontent's CDN (ignores query + no-cache; ~5min TTL, verified). Comment no longer overclaims. Known issue tracked in #452. Co-Authored-By: Claude Opus 4.8 --- lib/services/config_source_service.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/services/config_source_service.dart b/lib/services/config_source_service.dart index 2ba7f7e..6837ccd 100644 --- a/lib/services/config_source_service.dart +++ b/lib/services/config_source_service.dart @@ -79,11 +79,13 @@ class ConfigSourceService { Future _get(String url) async { final http.Response resp; try { - // Cache-bust: config fetches must never serve a stale catalog/profile - // (raw.githubusercontent sits behind a CDN with a multi-minute TTL, so a - // re-import right after a catalog edit could otherwise return the old - // file). A unique query param guarantees a cache miss; the no-cache - // headers are belt-and-braces. + // Cache-bust for federated catalogs on normal servers/CDNs: a unique + // query param + no-cache headers get them to serve fresh content. + // KNOWN LIMITATION (#452): raw.githubusercontent — the DEFAULT catalog + // host — ignores BOTH (verified: X-Cache HIT on a unique-query request) + // and serves its cached copy for up to max-age=300 (~5 min). So the + // default catalog can lag up to 5 min after an edit; this does not defeat + // that. Kept because region-hosted catalogs elsewhere do honor it. final base = Uri.parse(url); final busted = base.replace( queryParameters: {