From c89947615a6cb840a8929f15ffddc2c6a93f7b3f Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 7 Apr 2026 13:34:41 +0700 Subject: [PATCH] fix: add cache-busting param to REST API fetch URL Append &_=${Date.now()} to the fetch URL in fetchArticles() to bypass LiteSpeed and CDN REST API caches. The in-memory JS apiCache key remains unchanged so client-side deduplication still works. --- public/js/peptide-news-feed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/peptide-news-feed.js b/public/js/peptide-news-feed.js index c3c2ee3..2b147f9 100644 --- a/public/js/peptide-news-feed.js +++ b/public/js/peptide-news-feed.js @@ -94,7 +94,7 @@ async function fetchArticles(restUrl, page, count, signal) { const cacheKey = `${restUrl}:${page}:${count}`; const cached = getCached(cacheKey); if (cached) return cached; - const url = `${restUrl}articles?count=${count}&page=${page}`; + const url = `${restUrl}articles?count=${count}&page=${page}&_=${Date.now()}`; const resp = await fetch(url, { signal });