You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/cloudflare/caching.mdx
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,28 +53,57 @@ The binding name used in your app's worker is `NEXT_CACHE_WORKERS_KV`. The servi
53
53
54
54
In your project's OpenNext config, enable the KV cache and set up a queue.
55
55
56
-
The memory queue will send revalidation requests to a page when needed, and offers support for de-duplicating requests on a per-isolate basis. There might still be duplicate requests under high traffic or across regions.
57
-
58
-
<Callouttype="warning">
59
-
The memory queue provided by `@opennextjs/cloudflare` is not fully suitable for production deployments, you
60
-
can use it at your own risk!
61
-
</Callout>
56
+
The Durable Object Queue will send revalidation requests to a page when needed, and offers support for de-duplicating requests.
57
+
By default there will be a maximum of 10 instance of the Durables Object Queue and they can each process up to 5 requests in parallel.(For up to 50 ISR revalidations in parallel)
You can customize the behaviors of the queue with environment variables:
91
+
- The max number of durable workers that can be created (MAX_REVALIDATE_CONCURRENCY)
92
+
- The max number of revalidations that can be processed by an instance of durable worker at the same time (MAX_REVALIDATION_BY_DURABLE_OBJECT)
93
+
- The max time in milliseconds that a revalidation can take before being considered as failed (REVALIDATION_TIMEOUT_MS)
94
+
- The amount of time after which a revalidation will be attempted again if it failed. If it fails again it will exponentially back off until it reaches the max retry interval (REVALIDATION_RETRY_INTERVAL_MS)
95
+
- The maximum number of attempts that can be made to revalidate a path (MAX_REVALIDATION_ATTEMPTS)
96
+
97
+
75
98
<Callout>
76
-
The `direct` mode for the queue is intended for debugging purposes and is not recommended for use in
99
+
There is 2 additional modes that you can use for the queue `direct` and the memory queue
100
+
101
+
- The memory queue will dedupe request but only on a per isolate basis. It is not fully suitable for production deployments, you
102
+
can use it at your own risk!
103
+
104
+
- The `direct` mode for the queue is intended for debugging purposes and is not recommended for use in
77
105
production. We are actively working on a solution that will be suitable for production.
0 commit comments