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:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user