@@ -54,21 +54,12 @@ The memory queue will send revalidation requests to a page when needed, and offe
5454
5555``` ts
5656// open-next.config.ts
57- import incrementalCache from " @opennextjs/cloudflare/kv-cache" ;
58- import memoryQueue from " @opennextjs/cloudflare/memory-queue" ;
59-
60- const config: OpenNextConfig = {
61- default: {
62- override: {
63- // ...
64- incrementalCache : () => incrementalCache ,
65- queue : () => memoryQueue ,
66- },
67- },
68- // ...
69- };
57+ import { defineCloudflareConfig , kvIncrementalCache , memoryQueue } from " @opennextjs/cloudflare" ;
7058
71- export default config ;
59+ export default defineCloudflareConfig ({
60+ incrementalCache: kvIncrementalCache ,
61+ queue: memoryQueue ,
62+ });
7263```
7364
7465
@@ -125,21 +116,13 @@ In your project's OpenNext config, enable the KV cache and set up a queue. The q
125116
126117``` ts
127118// open-next.config.ts
128- import tagCache from " @opennextjs/cloudflare/d1-tag-cache" ;
129- import incrementalCache from " @opennextjs/cloudflare/kv-cache" ;
130- import memoryQueue from " @opennextjs/cloudflare/memory-queue" ;
131-
132- const config: OpenNextConfig = {
133- default: {
134- override: {
135- // ...
136- incrementalCache : () => incrementalCache ,
137- queue : () => memoryQueue ,
138- tagCache : () => tagCache ,
139- },
140- },
141- // ...
142- };
119+ import { defineCloudflareConfig , kvIncrementalCache , d1TagCache , memoryQueue } from " @opennextjs/cloudflare" ;
120+
121+ export default defineCloudflareConfig ({
122+ incrementalCache: kvIncrementalCache ,
123+ tagCache: d1TagCache ,
124+ queue: memoryQueue ,
125+ });
143126```
144127
145128##### 4. Initialise the cache during deployments
0 commit comments