an app to share curated trails sidetrail.app
atproto nextjs react rsc

add cachebreaker patch for use cache

+38
+38
patches/next+16.1.0-canary.12.patch
··· 1 + diff --git a/node_modules/next/dist/esm/server/use-cache/use-cache-wrapper.js b/node_modules/next/dist/esm/server/use-cache/use-cache-wrapper.js 2 + index e0995a2..86b341e 100644 3 + --- a/node_modules/next/dist/esm/server/use-cache/use-cache-wrapper.js 4 + +++ b/node_modules/next/dist/esm/server/use-cache/use-cache-wrapper.js 5 + @@ -775,12 +775,12 @@ export async function cache(kind, id, boundArgsLength, originalFn, argsObj) { 6 + // mutable, but only lives as long as the request, so the key does not 7 + // need to include cookies. 8 + const cacheKeyParts = hmrRefreshHash ? [ 9 + - buildId, 10 + + process.env.SIDETRAIL_USE_CACHE_BREAKER || buildId, 11 + id, 12 + args, 13 + hmrRefreshHash 14 + ] : [ 15 + - buildId, 16 + + process.env.SIDETRAIL_USE_CACHE_BREAKER || buildId, 17 + id, 18 + args 19 + ]; 20 + diff --git a/node_modules/next/dist/server/use-cache/use-cache-wrapper.js b/node_modules/next/dist/server/use-cache/use-cache-wrapper.js 21 + index 44a779c..2911f93 100644 22 + --- a/node_modules/next/dist/server/use-cache/use-cache-wrapper.js 23 + +++ b/node_modules/next/dist/server/use-cache/use-cache-wrapper.js 24 + @@ -826,12 +826,12 @@ async function cache(kind, id, boundArgsLength, originalFn, argsObj) { 25 + // mutable, but only lives as long as the request, so the key does not 26 + // need to include cookies. 27 + const cacheKeyParts = hmrRefreshHash ? [ 28 + - buildId, 29 + + process.env.SIDETRAIL_USE_CACHE_BREAKER || buildId, 30 + id, 31 + args, 32 + hmrRefreshHash 33 + ] : [ 34 + - buildId, 35 + + process.env.SIDETRAIL_USE_CACHE_BREAKER || buildId, 36 + id, 37 + args 38 + ];