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
By default, all `fetch()`subrequests made in your Next.js app are cached. Refer to the [Next.js documentation](https://nextjs.org/docs/app/building-your-application/caching#opting-out-1) for information about how to disable caching for an individual subrequest, or for an entire route.
8
+
In Next.js 14, all `fetch()`requests made in your app are cached by default. However, in Next.js 15, `fetch()` requests are not cached by default. Refer to the [Next.js documentation](https://nextjs.org/docs/app/building-your-application/caching#opting-out-1) for information about how to enable or disable caching for an individual request, or for an entire route.
9
9
10
-
[The cache persists across deployments](https://nextjs.org/docs/app/building-your-application/caching#data-cache). You are responsible for revalidating/purging this cache.
10
+
[The cache is unique per build (prefixed by BUILD_ID) so caches are not reused between deployments](https://nextjs.org/docs/app/building-your-application/caching#data-cache). You are responsible for revalidating/purging the cache for a specific build or if you keep the same build ID.
11
11
12
12
Next.js primes the cache at build time. The build time values are serverd by the [Workers Assets](https://developers.cloudflare.com/workers/static-assets/).
13
13
@@ -57,28 +57,57 @@ The binding name used in your app's worker is `NEXT_CACHE_WORKERS_KV`.
57
57
58
58
In your project's OpenNext config, enable the KV cache and set up a queue.
59
59
60
-
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.
61
-
62
-
<Callouttype="warning">
63
-
The memory queue provided by `@opennextjs/cloudflare` is not fully suitable for production deployments, you
64
-
can use it at your own risk!
65
-
</Callout>
60
+
The Durable Object Queue will send revalidation requests to a page when needed, and offers support for de-duplicating requests.
61
+
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:
95
+
- The max number of durable workers that can be created (MAX_REVALIDATE_CONCURRENCY)
96
+
- The max number of revalidations that can be processed by an instance of durable worker at the same time (MAX_REVALIDATION_BY_DURABLE_OBJECT)
97
+
- The max time in milliseconds that a revalidation can take before being considered as failed (REVALIDATION_TIMEOUT_MS)
98
+
- 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)
99
+
- The maximum number of attempts that can be made to revalidate a path (MAX_REVALIDATION_ATTEMPTS)
100
+
101
+
79
102
<Callout>
80
-
The `direct` mode for the queue is intended for debugging purposes and is not recommended for use in
103
+
There is 2 additional modes that you can use for the queue `direct` and the memory queue
104
+
105
+
- The memory queue will dedupe request but only on a per isolate basis. It is not fully suitable for production deployments, you
106
+
can use it at your own risk!
107
+
108
+
- The `direct` mode for the queue is intended for debugging purposes and is not recommended for use in
81
109
production. We are actively working on a solution that will be suitable for production.
0 commit comments