-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathopen-next.config.ts
More file actions
26 lines (25 loc) · 1.01 KB
/
open-next.config.ts
File metadata and controls
26 lines (25 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { defineCloudflareConfig } from '@opennextjs/cloudflare'
import { purgeCache } from '@opennextjs/cloudflare/overrides/cache-purge/index'
import r2IncrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache'
import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache'
import doQueue from '@opennextjs/cloudflare/overrides/queue/do-queue'
import queueCache from '@opennextjs/cloudflare/overrides/queue/queue-cache'
import doShardedTagCache from '@opennextjs/cloudflare/overrides/tag-cache/do-sharded-tag-cache'
export default defineCloudflareConfig({
enableCacheInterception: true,
incrementalCache: withRegionalCache(r2IncrementalCache, {
mode: 'long-lived',
shouldLazilyUpdateOnCacheHit: true,
}),
queue: queueCache(doQueue, {
regionalCacheTtlSec: 5,
waitForQueueAck: true,
}),
tagCache: doShardedTagCache({
baseShardSize: 4,
regionalCache: true,
}),
cachePurge: purgeCache({
type: 'durableObject',
}),
})