You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deferred (Lazy) section cache key ignores URL search params: stale grid on client-side navigation with ?sort/?filter #636
pagePath has no query string, and propsHash is djb2Hex(JSON.stringify(rawProps)) computed from the raw CMS props (packages/blocks/src/cms/resolve.ts). Props that reference a loader (for example { "__resolveType": "PLP Loader" }) hash identically for every query string.
Repro
Wrap a search/listing section in website/sections/Rendering/Lazy.tsx on a page whose loader reads ?sort_by= or ?filter.*.
Load /category, then client-side navigate to /category?sort_by=price:asc (sort, filter, pager, or browser back).
The route loader refetches with the new params, but the deferred section is served from the cache entry of the first render, so the grid stays stale.
Expected: the key varies with the search params the loader depends on (or the cache is invalidated when the search string changes).
Workaround: unwrap the section from Lazy so it renders eagerly from the route loader (deco-sites/reserva-nuvemshop#97).
Suggested fix: include location.search (or a hash of the resolved props) in stableKey.
Activity