diff --git a/public/s/js/f0ckm.js b/public/s/js/f0ckm.js index a90f1aa..f8d9883 100644 --- a/public/s/js/f0ckm.js +++ b/public/s/js/f0ckm.js @@ -2216,12 +2216,14 @@ window.cancelAnimFrame = (function () { } - // Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction - if (isGrid && options.skipPush) { + // Check for cached grid (Index/Grid Only) - RESTORE EARLY to avoid pagination/layout destruction. + // The cache is checked on ANY grid navigation (not just popstate/skipPush), so clicking the + // navbar brand from an item view restores the grid instantly without re-fetching. + if (isGrid && !options.skipCache) { const targetCacheKey = urlObj.pathname + urlObj.search; if (gridCacheMap.has(targetCacheKey)) { const cache = gridCacheMap.get(targetCacheKey); - gridCacheMap.delete(targetCacheKey); // Consume cache + // Keep cache alive — it is already cleared on mode/filter changes (gridCacheMap.clear()). stopMedia();