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: README.md
+49-9Lines changed: 49 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,56 @@ The documentation at [@neshca/cache-handler - caching-tools.github.io/next-share
20
20
21
21
If upgrading from Next 14 or earlier, **flush your Redis cache** before running new version of the application locally and on your hosted environments. **Cache formats between Next 14 and 15 are incompatible**.
22
22
23
-
## Next 15 Support
23
+
## Next.js Compatibility
24
24
25
25
The original `@neshca/cache-handler` package does not support Next.js 15.
26
26
27
27
Prior to 2.0.0, this package provided wrappers and enhancements to allow using `@neshca/cache-handler` with Next.js 15.
28
28
From version 2.0.0 onward, `@fortedigital/nextjs-cache-handler` is a standalone solution with no dependency on `@neshca/cache-handler` and is fully compatible with Next.js 15 and [redis 5](https://www.npmjs.com/package/redis).
29
29
30
+
**Version Requirements:**
31
+
32
+
-**Next.js 15**: Version 2.0.0+ (version 3.0.0+ recommended for latest improvements and maintenance development)
33
+
-**Next.js 16**: Version 3.0.0+ required
34
+
30
35
We aim to keep up with new Next.js releases and will introduce major changes with appropriate version bumps.
|`cacheHandlers` config (for `'use cache'`) | ❌ | ❌ | Not yet supported - Planned for Next 16 |
61
+
|`'use cache'` directive | ❌ | ❌ | Not yet supported - Planned for Next 16 |
62
+
|`'use cache: remote'` directive | ❌ | ❌ | Not yet supported - Planned for Next 16 |
63
+
|`'use cache: private'` directive | ❌ | ❌ | Not yet supported - Planned for Next 16 |
64
+
|`cacheComponents`| ❌ | ❌ | Not yet supported - Planned for Next 16 |
65
+
66
+
**Notes:**
67
+
68
+
-`revalidateTag()` in Next.js 16 requires a `cacheLife` parameter (`'max'`, `'hours'`, or `'days'`). This is a breaking change from Next.js 15.
69
+
-`cacheLife` profiles are primarily designed for Vercel's infrastructure. Custom cache handlers may not fully differentiate between different `cacheLife` profiles.
70
+
-`updateTag()` is only available in Server Actions, not Route Handlers.
71
+
- The new `cacheHandlers` API and `'use cache'` directives are not yet supported by this package.
72
+
32
73
### Swapping from `@neshca/cache-handler`
33
74
34
75
If you already use `@neshca/cache-handler` the setup is very streamlined and you just need to replace package references. If you're starting fresh please check [the example project](./examples/redis-minimal).
@@ -479,7 +520,6 @@ For context or historical documentation, you may still reference the [original p
479
520
480
521
`neshClassicCache` allows you to cache the results of expensive operations, like database queries, and reuse them across multiple requests. Unlike the [`neshCache`](/functions/nesh-cache) or [`unstable_cache` ↗](https://nextjs.org/docs/app/api-reference/functions/unstable_cache) function, `neshClassicCache` must be used in a Next.js Pages Router allowing users to cache data in the `getServerSideProps` and API routes.
481
522
482
-
483
523
> [!NOTE]
484
524
>
485
525
> Cache entries created with `neshClassicCache` can be revalidated only by the [`revalidateTag` ↗](https://nextjs.org/docs/app/api-reference/functions/revalidateTag) method.
@@ -513,11 +553,11 @@ This is an object that controls how the cache behaves. It can contain the follow
0 commit comments