From a3d1558f99fe92e5532dfdb027001e43f7d3054f Mon Sep 17 00:00:00 2001 From: conico974 Date: Mon, 4 May 2026 14:03:29 +0200 Subject: [PATCH] Disable regional cache for debugging purposes (#4233) --- .../openNext/incrementalCache/server.ts | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/gitbook/openNext/incrementalCache/server.ts b/packages/gitbook/openNext/incrementalCache/server.ts index 1054ab76f..4cbd6562e 100644 --- a/packages/gitbook/openNext/incrementalCache/server.ts +++ b/packages/gitbook/openNext/incrementalCache/server.ts @@ -1,13 +1,15 @@ -import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache'; import { GitbookIncrementalCache } from './incrementalCache'; -export default withRegionalCache(new GitbookIncrementalCache(), { - mode: 'long-lived', - // Because of a race condition, the middleware may have populated the cache entry before `cache.match` had time to run on the server. - // TODO: We should bypass the incremental cache entirely when the interceptor has caught the request. Should be done in OpenNext. - bypassTagCacheOnCacheHit: false, - //TODO: remove, reducing cache ttl of regional cache to help debugging - defaultLongLivedTtlSec: 5 * 60 /* 5 minutes */, - // We don't want to update the cache entry on every cache hit - shouldLazilyUpdateOnCacheHit: false, -}); +// export default withRegionalCache(new GitbookIncrementalCache(), { +// mode: 'long-lived', +// // Because of a race condition, the middleware may have populated the cache entry before `cache.match` had time to run on the server. +// // TODO: We should bypass the incremental cache entirely when the interceptor has caught the request. Should be done in OpenNext. +// bypassTagCacheOnCacheHit: false, +// //TODO: remove, reducing cache ttl of regional cache to help debugging +// defaultLongLivedTtlSec: 5 * 60 /* 5 minutes */, +// // We don't want to update the cache entry on every cache hit +// shouldLazilyUpdateOnCacheHit: false, +// }); + +//TODO: reenable regional cache once we know what's going on +export default new GitbookIncrementalCache();