@trieb.work/nextjs-turbo-redis-cache 1.16.2 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.github/workflows/ci.yml +11 -2
  2. package/CHANGELOG.md +7 -0
  3. package/README.md +4 -1
  4. package/package.json +2 -2
  5. package/test/README.md +3 -3
  6. package/test/nextjs-test-projects/next-app-15-4-11/pnpm-lock.yaml +1 -1
  7. package/test/nextjs-test-projects/next-app-16-0-11/pnpm-lock.yaml +1 -1
  8. package/test/nextjs-test-projects/next-app-16-0-11-cache-components/pnpm-lock.yaml +1 -1
  9. package/test/nextjs-test-projects/next-app-16-2-6/pnpm-lock.yaml +1 -1
  10. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/pnpm-lock.yaml +1 -1
  11. package/test/nextjs-test-projects/next-app-16-3-0/README.md +36 -0
  12. package/test/nextjs-test-projects/next-app-16-3-0/eslint.config.mjs +18 -0
  13. package/test/nextjs-test-projects/next-app-16-3-0/next.config.ts +7 -0
  14. package/test/nextjs-test-projects/next-app-16-3-0/package.json +28 -0
  15. package/test/nextjs-test-projects/next-app-16-3-0/pnpm-lock.yaml +4284 -0
  16. package/test/nextjs-test-projects/next-app-16-3-0/postcss.config.mjs +7 -0
  17. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/cached-static-fetch/route.ts +18 -0
  18. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +27 -0
  19. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidatePath/route.ts +15 -0
  20. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidateTag/route.ts +20 -0
  21. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidated-fetch/route.ts +17 -0
  22. package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/uncached-fetch/route.ts +15 -0
  23. package/test/nextjs-test-projects/next-app-16-3-0/src/app/favicon.ico +0 -0
  24. package/test/nextjs-test-projects/next-app-16-3-0/src/app/globals.css +26 -0
  25. package/test/nextjs-test-projects/next-app-16-3-0/src/app/layout.tsx +59 -0
  26. package/test/nextjs-test-projects/next-app-16-3-0/src/app/page.tsx +755 -0
  27. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +19 -0
  28. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +34 -0
  29. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +25 -0
  30. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/no-fetch/default-page/page.tsx +55 -0
  31. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +19 -0
  32. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +35 -0
  33. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +25 -0
  34. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +19 -0
  35. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +32 -0
  36. package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +25 -0
  37. package/test/nextjs-test-projects/next-app-16-3-0/src/app/revalidation-interface.tsx +267 -0
  38. package/test/nextjs-test-projects/next-app-16-3-0/src/app/update-tag-test/page.tsx +25 -0
  39. package/test/nextjs-test-projects/next-app-16-3-0/tsconfig.json +34 -0
  40. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/README.md +36 -0
  41. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/cache-handler.js +3 -0
  42. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/eslint.config.mjs +18 -0
  43. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/next.config.ts +13 -0
  44. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/package.json +28 -0
  45. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/pnpm-lock.yaml +4284 -0
  46. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/postcss.config.mjs +7 -0
  47. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/file.svg +1 -0
  48. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/globe.svg +1 -0
  49. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/next.svg +1 -0
  50. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/vercel.svg +1 -0
  51. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/window.svg +1 -0
  52. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-static-fetch/route.ts +19 -0
  53. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-with-cachelife/route.ts +24 -0
  54. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-with-tag/route.ts +21 -0
  55. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/revalidate-tag/route.ts +19 -0
  56. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/revalidated-fetch/route.ts +19 -0
  57. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/cachelife-short/page.tsx +110 -0
  58. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/page.tsx +90 -0
  59. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/runtime-data-suspense/page.tsx +127 -0
  60. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/stale-while-revalidate/page.tsx +130 -0
  61. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/tag-invalidation/page.tsx +127 -0
  62. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/use-cache-nondeterministic/page.tsx +110 -0
  63. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/favicon.ico +0 -0
  64. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/globals.css +26 -0
  65. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/layout.tsx +57 -0
  66. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/page.tsx +755 -0
  67. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/revalidation-interface.tsx +267 -0
  68. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/update-tag-test/page.tsx +22 -0
  69. package/test/nextjs-test-projects/next-app-16-3-0-cache-components/tsconfig.json +34 -0
  70. package/test/nextjs-test-projects/next-pages-16-2-6/pnpm-lock.yaml +4 -4
  71. package/test/nextjs-test-projects/next-pages-16-3-0/README.md +16 -0
  72. package/test/nextjs-test-projects/next-pages-16-3-0/eslint.config.mjs +18 -0
  73. package/test/nextjs-test-projects/next-pages-16-3-0/next.config.ts +7 -0
  74. package/test/nextjs-test-projects/next-pages-16-3-0/package.json +26 -0
  75. package/test/nextjs-test-projects/next-pages-16-3-0/pnpm-lock.yaml +3939 -0
  76. package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/api/revalidate.ts +24 -0
  77. package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/index.tsx +11 -0
  78. package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/isr/[slug].tsx +49 -0
  79. package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/static-forever.tsx +20 -0
  80. package/test/nextjs-test-projects/next-pages-16-3-0/tsconfig.json +34 -0
  81. package/test/vitest/integration/nextjs-cache-handler.integration.test.ts +51 -32
@@ -65,6 +65,7 @@ jobs:
65
65
  - next-app-15-4-11
66
66
  - next-app-16-0-11
67
67
  - next-app-16-2-6
68
+ - next-app-16-3-0
68
69
  steps:
69
70
  - name: Checkout code
70
71
  uses: actions/checkout@v6
@@ -111,6 +112,11 @@ jobs:
111
112
  integration-pages:
112
113
  runs-on: ubuntu-latest
113
114
  needs: lint-and-unit
115
+ strategy:
116
+ matrix:
117
+ pages-test-app:
118
+ - next-pages-16-2-6
119
+ - next-pages-16-3-0
114
120
  steps:
115
121
  - name: Checkout code
116
122
  uses: actions/checkout@v6
@@ -143,15 +149,16 @@ jobs:
143
149
  run: redis-cli config set notify-keyspace-events Exe
144
150
 
145
151
  - name: Install test project
146
- run: cd test/nextjs-test-projects/next-pages-16-2-6 && pnpm install
152
+ run: cd test/nextjs-test-projects/${{ matrix.pages-test-app }} && pnpm install
147
153
 
148
154
  - name: Build test project
149
- run: cd test/nextjs-test-projects/next-pages-16-2-6 && pnpm build
155
+ run: cd test/nextjs-test-projects/${{ matrix.pages-test-app }} && pnpm build
150
156
 
151
157
  - name: Run Pages Router integration tests
152
158
  run: pnpm test:integration:pages
153
159
  env:
154
160
  SKIP_BUILD: true
161
+ NEXT_PAGES_TEST_APP: ${{ matrix.pages-test-app }}
155
162
 
156
163
  integration-build-id-prefix:
157
164
  runs-on: ubuntu-latest
@@ -204,6 +211,7 @@ jobs:
204
211
  cache-components-app:
205
212
  - next-app-16-0-11-cache-components
206
213
  - next-app-16-2-6-cache-components
214
+ - next-app-16-3-0-cache-components
207
215
  steps:
208
216
  - name: Checkout code
209
217
  uses: actions/checkout@v6
@@ -254,6 +262,7 @@ jobs:
254
262
  cache-components-app:
255
263
  - next-app-16-0-11-cache-components
256
264
  - next-app-16-2-6-cache-components
265
+ - next-app-16-3-0-cache-components
257
266
  steps:
258
267
  - name: Checkout code
259
268
  uses: actions/checkout@v6
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.17.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.16.2...v1.17.0) (2026-08-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * add Next.js 16.3.0 support ([f7b40b5](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/f7b40b54e76cb605b8986f2bd01477662d94bd06))
7
+
1
8
  ## [1.16.2](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.16.1...v1.16.2) (2026-08-13)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # nextjs-turbo-redis-cache - Next.js Cache Handler
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@trieb.work/nextjs-turbo-redis-cache.svg)](https://www.npmjs.com/package/@trieb.work/nextjs-turbo-redis-cache)
4
- ![Turbo redis cache image](https://github.com/user-attachments/assets/4103191e-4f4d-4139-a519-0b5bfab3e8b4)
4
+ <img width="2512" height="1602" alt="Turbo redis cache image" src="https://github.com/user-attachments/assets/6f46e1fb-fcf7-4157-856c-196a1483534f" />
5
5
 
6
6
  The ultimate Redis Cache Handler for Next.js 15 / 16, supporting both the App Router and the Pages Router. Built for production-ready, large-scale projects, it delivers unparalleled performance and efficiency with features tailored for high-traffic applications. This package has been created after extensibly testing the @neshca package and finding several major issues with it.
7
7
 
@@ -34,6 +34,9 @@ Tested versions are:
34
34
  - Nextjs 16.2.6 + redis client 4.7.0 (cacheComponents: false)
35
35
  - Nextjs 16.2.6 + redis client 4.7.0 (cacheComponents: true)
36
36
  - Nextjs 16.2.6 + redis client 4.7.0 (Pages Router)
37
+ - Nextjs 16.3.0 + redis client 4.7.0 (cacheComponents: false)
38
+ - Nextjs 16.3.0 + redis client 4.7.0 (cacheComponents: true)
39
+ - Nextjs 16.3.0 + redis client 4.7.0 (Pages Router)
37
40
 
38
41
  _Cache Components_ (Next.js 16+) are fully supported. Automated test coverage includes `'use cache'`, `cacheTag`, and `cacheLife` flows in the Cache Components integration suite.
39
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trieb.work/nextjs-turbo-redis-cache",
3
- "version": "1.16.2",
3
+ "version": "1.17.0",
4
4
  "homepage": "https://trwk.de/case-studies/nextjs-turbo-redis-cache",
5
5
  "repository": {
6
6
  "type": "git",
@@ -98,7 +98,7 @@
98
98
  "vitest": "^4.0.13"
99
99
  },
100
100
  "peerDependencies": {
101
- "next": ">=15.0.3 <16.3.0",
101
+ "next": ">=15.0.3 <17.0.0",
102
102
  "redis": "4.7.0"
103
103
  },
104
104
  "packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800"
package/test/README.md CHANGED
@@ -55,7 +55,7 @@ These tests spawn a real Next.js server as a child process, make `fetch()` reque
55
55
 
56
56
  ### Standard Integration (`nextjs-cache-handler.integration.test.ts`)
57
57
 
58
- Full cache lifecycle: static pages, fetch caching, revalidation, tag invalidation, TTL behavior. In CI this runs against a matrix of Next.js versions (15.4–16.2).
58
+ Full cache lifecycle: static pages, fetch caching, revalidation, tag invalidation, TTL behavior. In CI this runs against Next.js 15.4, 16.0, 16.2, and 16.3. Nested fetch entries are resolved from their explicit cache tag in Redis's shared-tags map rather than Next.js's internal fetch-key hash, which changed in Next.js 16.3.
59
59
 
60
60
  ```bash
61
61
  pnpm test:integration
@@ -63,7 +63,7 @@ pnpm test:integration
63
63
 
64
64
  ### Pages Router (`pages-router.integration.test.ts`)
65
65
 
66
- Pages Router cache lifecycle against the `next-pages-16-2-6` app: `PAGES` entry format, TTL derivation from `getStaticProps` `revalidate`, `fallback: 'blocking'` first hits, `notFound: true` (null cache entries), `redirect:` results, and `revalidate: false` TTL fallback.
66
+ Pages Router cache lifecycle against the `next-pages-16-2-6` and `next-pages-16-3-0` apps: `PAGES` entry format, TTL derivation from `getStaticProps` `revalidate`, `fallback: 'blocking'` first hits, `notFound: true` (null cache entries), `redirect:` results, and `revalidate: false` TTL fallback.
67
67
 
68
68
  Starts **two** `next start` instances of the same build sharing one Redis and proves that on-demand revalidation (`res.revalidate(path)`) triggered on instance A is served fresh by instance B (HTML and `/_next/data` pageData JSON) — the multi-instance ISR scenario behind a load balancer.
69
69
 
@@ -81,7 +81,7 @@ pnpm test:integration:build-id-prefix
81
81
 
82
82
  ### Cache Components (`cache-components/`)
83
83
 
84
- Integration tests specific to Next.js 16 Cache Components (`use cache`). Uses `next-app-16-2-6-cache-components` as the test app.
84
+ Integration tests specific to Next.js 16 Cache Components (`use cache`). CI runs them against the 16.0, 16.2, and 16.3 Cache Components test apps.
85
85
 
86
86
  | File | What it tests |
87
87
  | -------------------------------------- | ------------------------------------------------------------------------------------------------------ |
@@ -492,7 +492,7 @@ packages:
492
492
  '@trieb.work/nextjs-turbo-redis-cache@file:../../..':
493
493
  resolution: {directory: ../../.., type: directory}
494
494
  peerDependencies:
495
- next: '>=15.0.3 <16.3.0'
495
+ next: '>=15.0.3 <17.0.0'
496
496
  redis: 4.7.0
497
497
 
498
498
  '@tybys/wasm-util@0.9.0':
@@ -561,7 +561,7 @@ packages:
561
561
  '@trieb.work/nextjs-turbo-redis-cache@file:../../..':
562
562
  resolution: {directory: ../../.., type: directory}
563
563
  peerDependencies:
564
- next: '>=15.0.3 <16.3.0'
564
+ next: '>=15.0.3 <17.0.0'
565
565
  redis: 4.7.0
566
566
 
567
567
  '@tybys/wasm-util@0.10.1':
@@ -568,7 +568,7 @@ packages:
568
568
  '@trieb.work/nextjs-turbo-redis-cache@file:../../..':
569
569
  resolution: {directory: ../../.., type: directory}
570
570
  peerDependencies:
571
- next: '>=15.0.3 <16.3.0'
571
+ next: '>=15.0.3 <17.0.0'
572
572
  redis: 4.7.0
573
573
 
574
574
  '@tybys/wasm-util@0.10.2':
@@ -561,7 +561,7 @@ packages:
561
561
  '@trieb.work/nextjs-turbo-redis-cache@file:../../..':
562
562
  resolution: {directory: ../../.., type: directory}
563
563
  peerDependencies:
564
- next: '>=15.0.3 <16.3.0'
564
+ next: '>=15.0.3 <17.0.0'
565
565
  redis: 4.7.0
566
566
 
567
567
  '@tybys/wasm-util@0.10.1':
@@ -561,7 +561,7 @@ packages:
561
561
  '@trieb.work/nextjs-turbo-redis-cache@file:../../..':
562
562
  resolution: {directory: ../../.., type: directory}
563
563
  peerDependencies:
564
- next: '>=15.0.3 <16.3.0'
564
+ next: '>=15.0.3 <17.0.0'
565
565
  redis: 4.7.0
566
566
 
567
567
  '@tybys/wasm-util@0.10.1':
@@ -0,0 +1,36 @@
1
+ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+ This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
27
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
34
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
@@ -0,0 +1,18 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import nextVitals from "eslint-config-next/core-web-vitals";
3
+ import nextTs from "eslint-config-next/typescript";
4
+
5
+ const eslintConfig = defineConfig([
6
+ ...nextVitals,
7
+ ...nextTs,
8
+ // Override default ignores of eslint-config-next.
9
+ globalIgnores([
10
+ // Default ignores of eslint-config-next:
11
+ ".next/**",
12
+ "out/**",
13
+ "build/**",
14
+ "next-env.d.ts",
15
+ ]),
16
+ ]);
17
+
18
+ export default eslintConfig;
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from 'next';
2
+
3
+ const nextConfig: NextConfig = {
4
+ cacheHandler: require.resolve('@trieb.work/nextjs-turbo-redis-cache'),
5
+ };
6
+
7
+ export default nextConfig;
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "next-app-16-3-0",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "eslint"
10
+ },
11
+ "dependencies": {
12
+ "next": "16.3.0",
13
+ "react": "19.2.0",
14
+ "react-dom": "19.2.0",
15
+ "redis": "4.7.0",
16
+ "@trieb.work/nextjs-turbo-redis-cache": "file:../../../"
17
+ },
18
+ "devDependencies": {
19
+ "@tailwindcss/postcss": "^4",
20
+ "@types/node": "^20",
21
+ "@types/react": "^19",
22
+ "@types/react-dom": "^19",
23
+ "eslint": "^9",
24
+ "eslint-config-next": "16.3.0",
25
+ "tailwindcss": "^4",
26
+ "typescript": "^5"
27
+ }
28
+ }