mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 18:43:29 +00:00
14 lines
590 B
TypeScript
14 lines
590 B
TypeScript
import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache';
|
|
|
|
import { GitbookIncrementalCache } from './incrementalCache';
|
|
|
|
export default withRegionalCache(new GitbookIncrementalCache(), {
|
|
mode: 'long-lived',
|
|
// We can do it because we use our own logic to invalidate the cache
|
|
bypassTagCacheOnCacheHit: true,
|
|
//TODO: bump it again once I figured out the race condition
|
|
defaultLongLivedTtlSec: 5 * 60, // 5 minutes
|
|
// We don't want to update the cache entry on every cache hit
|
|
shouldLazilyUpdateOnCacheHit: false,
|
|
});
|