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: .LICENSE
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@ MIT License
2
2
3
3
This extension is developed and maintained by Forte Digital. For more information about our products and services, visit [our website](https://fortedigital.com).
4
4
5
-
Copyright (c) 2024 Forte_ Digital and Arseny Kruglikov
5
+
This package was built on top of [`@neshca/cache-handler`](https://www.npmjs.com/package/@neshca/cache-handler).
6
+
7
+
Copyright (c) 2024 Forte\_ Digital and Arseny Kruglikov
6
8
7
9
Permission is hereby granted, free of charge, to any person obtaining a copy
8
10
of this software and associated documentation files (the "Software"), to deal
Copy file name to clipboardExpand all lines: README.md
+53-70Lines changed: 53 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,50 @@
2
2
3
3
# @fortedigital/nextjs-cache-handler
4
4
5
-
This package extends the functionality of [`@neshca/cache-handler`](https://www.npmjs.com/package/@neshca/cache-handler) by providing additional cache handlers for specialized use cases, specifically for Redis-based caching solutions. The original `@neshca/cache-handler` offers a robust caching API for Next.js applications, and this package introduces two new handlers for managing Redis cache with different expiration strategies and tag-based revalidation.
6
-
5
+
This package was initially built on top of [`@neshca/cache-handler`](https://www.npmjs.com/package/@neshca/cache-handler) by providing additional cache handlers for specialized use cases, specifically for Redis-based caching solutions. The original `@neshca/cache-handler` stopped getting updated for Next 15 and above. This package addresses compatibility issues with Next 15 and onwards.
@@ -43,60 +66,34 @@ if (process.env.NEXT_RUNTIME === "nodejs") {
43
66
44
67
## Installation
45
68
46
-
To install this package along with its dependencies:
47
-
48
-
```bash
49
-
npm install @fortedigital/nextjs-cache-handler
50
-
```
51
-
52
-
Package depends on the original `@neshca/cache-handler` package - you can use anything provided by it by using import/require from `@neshca/cache-handler`.
53
-
54
-
## Next 15 Support
69
+
## Next 15 Support and migration from `@neshca/cache-handler`
55
70
56
71
As `@neshca/cache-handler` does not officially support Next 15+ yet, we try to keep up with Next and prepare more or less temporary workarounds. At some point we will either create a fork of `@neshca/cache-handler` to fully support Next 15 or it gets updated by the maintainers. As for now we're building a set of decorators/workarounds you can use to build cache solutions for Next 15. We might need to do a full-blown rework which will be marked with a proper major version upgrade.
57
72
58
-
### String buffer breaking change
59
-
60
-
If you use Redis Strings cache handler with Next15+ you need to decorate the default Redis String handler with a buffer converter like this:
This cache handler converts buffers from cached route values to strings on save and back to buffers on read.
175
-
176
-
Next 15 decided to change types of some properties from String to Buffer which conflicts with how data is serialized to redis. It is recommended to use this handler with `redis-strings` in Next 15 as this handler make the following adjustment.
0 commit comments