Unverified Commit eef1392f authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix symbol for cache (#71270)

Small follow-up to https://github.com/vercel/next.js/pull/71263 this
should be `Symbol.for` so we use the same reference instead creating a
new Symbol.
parent d8c0c1a6
...@@ -43,8 +43,6 @@ export interface CacheHandlerValue { ...@@ -43,8 +43,6 @@ export interface CacheHandlerValue {
value: IncrementalCacheValue | null value: IncrementalCacheValue | null
} }
export const cacheHandlersSymbol = Symbol('@next/cache-handlers')
export class CacheHandler { export class CacheHandler {
// eslint-disable-next-line // eslint-disable-next-line
constructor(_ctx: CacheHandlerContext) {} constructor(_ctx: CacheHandlerContext) {}
...@@ -123,6 +121,7 @@ export class IncrementalCache implements IncrementalCacheType { ...@@ -123,6 +121,7 @@ export class IncrementalCache implements IncrementalCacheType {
const debug = !!process.env.NEXT_PRIVATE_DEBUG_CACHE const debug = !!process.env.NEXT_PRIVATE_DEBUG_CACHE
this.hasCustomCacheHandler = Boolean(CurCacheHandler) this.hasCustomCacheHandler = Boolean(CurCacheHandler)
const cacheHandlersSymbol = Symbol.for('@next/cache-handlers')
const _globalThis: typeof globalThis & { const _globalThis: typeof globalThis & {
[cacheHandlersSymbol]?: { [cacheHandlersSymbol]?: {
FetchCache?: typeof CacheHandler FetchCache?: typeof CacheHandler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment