Skip to content

Commit a3d1558

Browse files
authored
Disable regional cache for debugging purposes (#4233)
1 parent ca53869 commit a3d1558

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

  • packages/gitbook/openNext/incrementalCache
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache';
21
import { GitbookIncrementalCache } from './incrementalCache';
32

4-
export default withRegionalCache(new GitbookIncrementalCache(), {
5-
mode: 'long-lived',
6-
// Because of a race condition, the middleware may have populated the cache entry before `cache.match` had time to run on the server.
7-
// TODO: We should bypass the incremental cache entirely when the interceptor has caught the request. Should be done in OpenNext.
8-
bypassTagCacheOnCacheHit: false,
9-
//TODO: remove, reducing cache ttl of regional cache to help debugging
10-
defaultLongLivedTtlSec: 5 * 60 /* 5 minutes */,
11-
// We don't want to update the cache entry on every cache hit
12-
shouldLazilyUpdateOnCacheHit: false,
13-
});
3+
// export default withRegionalCache(new GitbookIncrementalCache(), {
4+
// mode: 'long-lived',
5+
// // Because of a race condition, the middleware may have populated the cache entry before `cache.match` had time to run on the server.
6+
// // TODO: We should bypass the incremental cache entirely when the interceptor has caught the request. Should be done in OpenNext.
7+
// bypassTagCacheOnCacheHit: false,
8+
// //TODO: remove, reducing cache ttl of regional cache to help debugging
9+
// defaultLongLivedTtlSec: 5 * 60 /* 5 minutes */,
10+
// // We don't want to update the cache entry on every cache hit
11+
// shouldLazilyUpdateOnCacheHit: false,
12+
// });
13+
14+
//TODO: reenable regional cache once we know what's going on
15+
export default new GitbookIncrementalCache();

0 commit comments

Comments
 (0)