File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11import type { OpenNextConfig } from '@opennextjs/cloudflare' ;
22import { defineCloudflareConfig } from '@opennextjs/cloudflare' ;
3- import incrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/kv-incremental-cache' ;
3+ import r2IncrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache' ;
4+ import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache' ;
45
5- const cloudflareConfig = defineCloudflareConfig ( { incrementalCache } ) ;
6+ const cloudflareConfig = defineCloudflareConfig ( {
7+ incrementalCache : withRegionalCache ( r2IncrementalCache , {
8+ mode : 'long-lived' ,
9+ } ) ,
10+ } ) ;
611
712const openNextConfig : OpenNextConfig = {
813 ...cloudflareConfig ,
Original file line number Diff line number Diff line change 3333 "fs" : " ./.wrangler/fs-assets-polyfilling/polyfills/node/fs.ts" ,
3434 "fs/promises" : " ./.wrangler/fs-assets-polyfilling/polyfills/node/fs/promises.ts" ,
3535 },
36- "kv_namespaces " : [
36+ "r2_buckets " : [
3737 {
38- "binding" : " NEXT_INC_CACHE_KV " ,
39- "id " : " 69b7422d56dd4244bc0127b69ecdc36f " ,
38+ "binding" : " NEXT_INC_CACHE_R2_BUCKET " ,
39+ "bucket_name " : " next-cache-r2-for-open-next-website " ,
4040 },
4141 ],
4242}
You can’t perform that action at this time.
0 commit comments