File tree 7 files changed +16
-17
lines changed
overrides/r2-incremental-cache 7 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 1
1
import { defineCloudflareConfig } from "@opennextjs/cloudflare" ;
2
- import kvIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/kv -incremental-cache" ;
2
+ import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2 -incremental-cache" ;
3
3
import memoryQueue from "@opennextjs/cloudflare/overrides/queue/memory-queue" ;
4
4
5
5
export default defineCloudflareConfig ( {
6
- incrementalCache : kvIncrementalCache ,
6
+ incrementalCache : r2IncrementalCache ,
7
7
queue : memoryQueue ,
8
8
} ) ;
Original file line number Diff line number Diff line change 8
8
"directory" : " .open-next/assets" ,
9
9
"binding" : " ASSETS"
10
10
},
11
- "kv_namespaces " : [
11
+ "r2_buckets " : [
12
12
{
13
- "binding" : " NEXT_INC_CACHE_KV " ,
14
- "id " : " <BINDING_ID >"
13
+ "binding" : " NEXT_INC_CACHE_R2_BUCKET " ,
14
+ "bucket_name " : " <BUCKET_NAME >"
15
15
}
16
16
],
17
17
"services" : [
Original file line number Diff line number Diff line change 1
1
import { defineCloudflareConfig } from "@opennextjs/cloudflare" ;
2
- import kvIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/kv -incremental-cache" ;
2
+ import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2 -incremental-cache" ;
3
3
import shardedTagCache from "@opennextjs/cloudflare/overrides/tag-cache/do-sharded-tag-cache" ;
4
4
import doQueue from "@opennextjs/cloudflare/overrides/queue/do-queue" ;
5
5
6
6
export default defineCloudflareConfig ( {
7
- incrementalCache : kvIncrementalCache ,
7
+ incrementalCache : r2IncrementalCache ,
8
8
// With such a configuration, we could have up to 12 * (8 + 2) = 120 Durable Objects instances
9
9
tagCache : shardedTagCache ( {
10
10
baseShardSize : 12 ,
Original file line number Diff line number Diff line change 26
26
"new_sqlite_classes" : [" DOQueueHandler" , " DOShardedTagCache" ]
27
27
}
28
28
],
29
- "kv_namespaces " : [
29
+ "r2_buckets " : [
30
30
{
31
- "binding" : " NEXT_INC_CACHE_KV " ,
32
- "id " : " <BINDING_ID >"
31
+ "binding" : " NEXT_INC_CACHE_R2_BUCKET " ,
32
+ "bucket_name " : " <BUCKET_NAME >"
33
33
}
34
34
],
35
35
"services" : [
Original file line number Diff line number Diff line change 1
1
import { defineCloudflareConfig } from "@opennextjs/cloudflare" ;
2
- import kvIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/kv -incremental-cache" ;
2
+ import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2 -incremental-cache" ;
3
3
import memoryQueue from "@opennextjs/cloudflare/overrides/queue/memory-queue" ;
4
4
5
5
export default defineCloudflareConfig ( {
6
- incrementalCache : kvIncrementalCache ,
6
+ incrementalCache : r2IncrementalCache ,
7
7
queue : memoryQueue ,
8
8
} ) ;
Original file line number Diff line number Diff line change 8
8
"directory" : " .open-next/assets" ,
9
9
"binding" : " ASSETS"
10
10
},
11
- "kv_namespaces " : [
11
+ "r2_buckets " : [
12
12
{
13
- "binding" : " NEXT_INC_CACHE_KV " ,
14
- "id " : " <BINDING_ID >"
13
+ "binding" : " NEXT_INC_CACHE_R2_BUCKET " ,
14
+ "bucket_name " : " <BUCKET_NAME >"
15
15
}
16
16
],
17
17
"services" : [
Original file line number Diff line number Diff line change 26
26
"r2_buckets" : [
27
27
{
28
28
"binding" : " NEXT_INC_CACHE_R2_BUCKET" ,
29
- "bucket_name" : " NEXT_INC_CACHE_R2_BUCKET" ,
30
- "preview_bucket_name" : " NEXT_INC_CACHE_R2_BUCKET"
29
+ "bucket_name" : " NEXT_INC_CACHE_R2_BUCKET"
31
30
}
32
31
]
33
32
},
You can’t perform that action at this time.
0 commit comments