diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md index ec1e53d6dc..aa2d9bcfc5 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -47,6 +47,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - feat: added `useUrl` hook that allows the consumer to get the current url in server or client component - fix: fix bug where search param is not being pass along during RSC streaming call [#623](https://github.com/Shopify/hydrogen/pull/623) - feat: expect collection seo by default +- fix: Clear browser fetch cache by @wizardlyhel in #591 ## 0.10.1 - 2022-01-26 diff --git a/packages/hydrogen/src/framework/Hydration/rsc.ts b/packages/hydrogen/src/framework/Hydration/rsc.ts index 0d03adc239..1c1088e317 100644 --- a/packages/hydrogen/src/framework/Hydration/rsc.ts +++ b/packages/hydrogen/src/framework/Hydration/rsc.ts @@ -84,13 +84,12 @@ export function useServerResponse(state: any) { ); } + cache.clear(); cache.set(key, response); return response; } export function useRefresh() { const refreshCache = unstable_useCacheRefresh(); - return function refresh(key: string, seededResponse: any) { - refreshCache(createResponseCache, new Map([[key, seededResponse]])); - }; + refreshCache(); }