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.
This commit is contained in:
peptiderepo
2026-04-07 13:34:41 +07:00
committed by GitHub
parent 99ef0c9638
commit c89947615a

View File

@@ -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
});