@trieb.work/nextjs-turbo-redis-cache 1.7.0 → 1.8.0-beta.1

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.
@@ -70,12 +70,14 @@ jobs:
70
70
  SKIP_BUILD: true
71
71
 
72
72
  - name: Code Coverage Comments
73
+ if: github.event_name == 'pull_request'
73
74
  uses: kcjpop/coverage-comments@v2.2
74
75
  with:
75
76
  github-token: ${{ secrets.GITHUB_TOKEN }}
76
77
  coverage-file: './coverage/lcov.info'
77
78
 
78
79
  - name: Dry run the release
80
+ if: github.event_name == 'pull_request'
79
81
  env:
80
82
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for Semantic Release
81
83
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM token for publishing
package/CHANGELOG.md CHANGED
@@ -1,176 +1,173 @@
1
- # [1.7.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.6.0...v1.7.0) (2025-05-26)
1
+ # [1.8.0-beta.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.7.1...v1.8.0-beta.1) (2025-06-10)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * add TLS/SSL support with Redis client configuration options ([9f80dd6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9f80dd6b53659ea488af6948a9c952ce0cda7490))
7
-
8
- # [1.6.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.5.1...v1.6.0) (2025-05-26)
6
+ * improve error handling ([dd591da](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/dd591daab9539e6ba96da1d1c493a1e771ba272d))
9
7
 
8
+ ## [1.7.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.7.0...v1.7.1) (2025-06-10)
10
9
 
11
10
  ### Bug Fixes
12
11
 
13
- * config ([d326ef4](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d326ef46298a96535720f78d562a20b27e7b3c8f))
14
- * config ([311d492](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/311d492c41d8c05b89d675753d79413632fc0019))
15
- * process.env.redisUrl ([a57fd6a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/a57fd6a6b641015726edf11a00fa5c020dea0cca))
16
- * readme ([2901ab0](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2901ab0e0d646839e1779107aa9bea80deacf6c8))
17
- * readme test startup ([e291666](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/e291666ed7b9d77c0f3baa68c3638bbad264a868))
18
- * rename redis_url to redisUrl to align with other config option naming convention + fix: readme ([2e3f20d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2e3f20dce31a678b781913d230581461b3d67a07))
12
+ - revalidate times for fetch entries from context is outdated ([4538f9f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/4538f9f8bf58b97727e83f2026929db11be470ec))
13
+ - revalidate times from data parameter for fetch entries ([e48f0d1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/e48f0d19b81b65ae2564453fd75251372080407e))
14
+ - revalidate times from data parameter for fetch entries ([3c38335](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3c3833561863ec4f07252ba7b9b30b42518b7485))
19
15
 
16
+ # [1.7.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.6.0...v1.7.0) (2025-05-26)
20
17
 
21
18
  ### Features
22
19
 
23
- * disable keyspace config check ([0b8878d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/0b8878d321808d00140664f51fc1d2d904cc4664))
24
-
25
- ## [1.5.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.5.0...v1.5.1) (2025-05-23)
20
+ - add TLS/SSL support with Redis client configuration options ([9f80dd6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9f80dd6b53659ea488af6948a9c952ce0cda7490))
26
21
 
22
+ # [1.6.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.5.1...v1.6.0) (2025-05-26)
27
23
 
28
24
  ### Bug Fixes
29
25
 
30
- * Update package.json ([63e6ffd](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/63e6ffdc21032cfb1c5ecb507276fd832ee8252a))
26
+ - config ([d326ef4](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d326ef46298a96535720f78d562a20b27e7b3c8f))
27
+ - config ([311d492](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/311d492c41d8c05b89d675753d79413632fc0019))
28
+ - process.env.redisUrl ([a57fd6a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/a57fd6a6b641015726edf11a00fa5c020dea0cca))
29
+ - readme ([2901ab0](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2901ab0e0d646839e1779107aa9bea80deacf6c8))
30
+ - readme test startup ([e291666](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/e291666ed7b9d77c0f3baa68c3638bbad264a868))
31
+ - rename redis_url to redisUrl to align with other config option naming convention + fix: readme ([2e3f20d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2e3f20dce31a678b781913d230581461b3d67a07))
31
32
 
32
- # [1.5.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.4.0...v1.5.0) (2025-05-16)
33
+ ### Features
33
34
 
35
+ - disable keyspace config check ([0b8878d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/0b8878d321808d00140664f51fc1d2d904cc4664))
36
+
37
+ ## [1.5.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.5.0...v1.5.1) (2025-05-23)
34
38
 
35
39
  ### Bug Fixes
36
40
 
37
- * improving log fitting the new redis url option ([59b7e59](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/59b7e5921c724ceff58917d712e310b18a23b464))
41
+ - Update package.json ([63e6ffd](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/63e6ffdc21032cfb1c5ecb507276fd832ee8252a))
38
42
 
43
+ # [1.5.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.4.0...v1.5.0) (2025-05-16)
44
+
45
+ ### Bug Fixes
46
+
47
+ - improving log fitting the new redis url option ([59b7e59](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/59b7e5921c724ceff58917d712e310b18a23b464))
39
48
 
40
49
  ### Features
41
50
 
42
- * add redis_url param ([cea59a1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cea59a10f0f2e1b73b8005683ea65f22ba95edc7))
51
+ - add redis_url param ([cea59a1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cea59a10f0f2e1b73b8005683ea65f22ba95edc7))
43
52
 
44
53
  # [1.4.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.3.0...v1.4.0) (2025-05-09)
45
54
 
46
-
47
55
  ### Bug Fixes
48
56
 
49
- * add tests ([225fc49](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/225fc49eff26d631c4b8d50a15ef2c864213f36b))
50
- * comment ([321ddec](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/321ddec4ee9b6a6e2cf1f78062d05d2cc7b45e4c))
51
- * remove retry ([ca4ff6c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/ca4ff6c4072e675da42dbcfe36d3ff422dc54f12))
52
- * remove retry ([3a1cf7d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3a1cf7dc5fd315ff3c84460052af20b8e40014ec))
53
- * remove retry ([207413b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/207413b81cb51143e04dff9a2310a185d6bba568))
54
- * tests and ci ([b0841ad](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/b0841ad9bc2c4b3ab9edde7047259cd45fbd5f02))
55
-
57
+ - add tests ([225fc49](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/225fc49eff26d631c4b8d50a15ef2c864213f36b))
58
+ - comment ([321ddec](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/321ddec4ee9b6a6e2cf1f78062d05d2cc7b45e4c))
59
+ - remove retry ([ca4ff6c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/ca4ff6c4072e675da42dbcfe36d3ff422dc54f12))
60
+ - remove retry ([3a1cf7d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3a1cf7dc5fd315ff3c84460052af20b8e40014ec))
61
+ - remove retry ([207413b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/207413b81cb51143e04dff9a2310a185d6bba568))
62
+ - tests and ci ([b0841ad](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/b0841ad9bc2c4b3ab9edde7047259cd45fbd5f02))
56
63
 
57
64
  ### Features
58
65
 
59
- * add support for nextjs 15.3.2 ([fcd8bb5](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fcd8bb5469bbefcd88397d3ef86ce3eb0fee7c02))
66
+ - add support for nextjs 15.3.2 ([fcd8bb5](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fcd8bb5469bbefcd88397d3ef86ce3eb0fee7c02))
60
67
 
61
68
  # [1.3.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.2.1...v1.3.0) (2025-05-08)
62
69
 
63
-
64
70
  ### Bug Fixes
65
71
 
66
- * encoding of data in cache entry ([9f0e747](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9f0e747b224294905427ba3060185f68fee16f0f))
67
- * escape characte ([dbd9141](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/dbd91413b777b2a4554597f3ca2b7f1de1163a80))
68
- * readme ([31dcaa4](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/31dcaa40ac19ea42a7f4d6ca33e4642704ad1f6b))
69
- * readme ([dfb69c8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/dfb69c861ddaa4a94411d419854e1c2e1e99152e))
70
- * test ([13b2cb8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/13b2cb8020ef7457473b208675bf3fce4161f492))
71
- * tests ([02357e1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/02357e1a7a29d997c95dce42399fef26530467d4))
72
- * tests ([a5587dc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/a5587dc3701a92069da945f548991aeb0d999285))
73
- * tests + re-add old implementation ([cb6d36d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cb6d36d46008d422b4396fd580d35fa97848edb7))
74
- * tests improvement ([73a3594](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/73a35946cfcd5e4811c2c09201bb02c9cdea5298))
75
- * tests, make them independent from each other ([35885e3](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/35885e38a58ac0aa976c86dd964549e2d3426a79))
76
-
72
+ - encoding of data in cache entry ([9f0e747](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9f0e747b224294905427ba3060185f68fee16f0f))
73
+ - escape characte ([dbd9141](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/dbd91413b777b2a4554597f3ca2b7f1de1163a80))
74
+ - readme ([31dcaa4](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/31dcaa40ac19ea42a7f4d6ca33e4642704ad1f6b))
75
+ - readme ([dfb69c8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/dfb69c861ddaa4a94411d419854e1c2e1e99152e))
76
+ - test ([13b2cb8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/13b2cb8020ef7457473b208675bf3fce4161f492))
77
+ - tests ([02357e1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/02357e1a7a29d997c95dce42399fef26530467d4))
78
+ - tests ([a5587dc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/a5587dc3701a92069da945f548991aeb0d999285))
79
+ - tests + re-add old implementation ([cb6d36d](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cb6d36d46008d422b4396fd580d35fa97848edb7))
80
+ - tests improvement ([73a3594](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/73a35946cfcd5e4811c2c09201bb02c9cdea5298))
81
+ - tests, make them independent from each other ([35885e3](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/35885e38a58ac0aa976c86dd964549e2d3426a79))
77
82
 
78
83
  ### Features
79
84
 
80
- * add files ([d8a2474](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d8a24747a6a2a12e2709d017dd36c7b80b2ad49f))
81
- * add more comments ([fb2f105](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fb2f10588566fad042d2e8da4999cf7bf591555d))
82
- * add new invalidation logic for fetch requests + new tests ([9d0d1d2](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9d0d1d2eafb785dbe91b172358a19494c623cc68))
83
- * add new tests ([836b882](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/836b88249365ea8745ca839a7dc3a3a4a77732e6))
84
- * add new tests ([d0e6833](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d0e68335ce13827f74ed1be5b115f7351beebd47))
85
- * adding a test page ([d4c8a8c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d4c8a8caaba7f4e5003606860babd9e50c6ed99a))
86
- * adding comfortable cache testing tool on homepage ([340d5cb](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/340d5cbc929ea8dcdbef2a949e1656d014d1f3bb))
87
- * adding nextjs unit tests ([368ec75](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/368ec755a8532a52526e3364cc02f64b7d4245fa))
88
- * changed ([8501a4e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/8501a4ee963975f32661789e31281785cf01519a))
89
- * changed hook ([92f9d3c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/92f9d3c4b8d9afd6bbbb9cc3a69138823f4d4f87))
90
- * changed hook ([6b32f0a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/6b32f0abcda935046e61242ba633728bcf23a460))
91
- * extend and fix caching + chore: update readme ([7ef38a8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7ef38a8ed2a20957cc78ffa213be3cb334736b19))
92
- * extend tests ([db9bb85](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/db9bb85e398a7d6e1ba522b990de7e5e241b54b6))
93
- * improve flaky ms sync delay ([6655884](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/665588474a09f1eb4f4683d2e107ec8b5b36b39a))
94
- * improve readme ([926493a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/926493a198d15e32e5e4b5c619375df85c646f1c))
95
- * improve tests ([3fcfadf](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3fcfadf49389fe8a7218417fb79ec74445e76cb7))
96
- * remove unnecessary revalidatedTagsMap ([7b5c313](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7b5c313e91b5157f113085be75dceba8013c0e81))
97
- * test is running ([6091471](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/6091471a12f954e3da4bd94db0929b0bd2cfd701))
98
- * tests ([bd6904e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/bd6904e94a43cfac183a5ec86cbbea0f4e40a816))
99
- * tests 2 ([974c952](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/974c952587a9d330934f49b26db84c037b3695f5))
100
- * update CI with pnpm ([c1b0b33](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/c1b0b33417b416bd7755b6b2f43d0b9bea5c7690))
101
- * update CI with pnpm ([d850377](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d85037706876dcb036bb6f952a48937c3e96cba3))
102
- * update CI with pnpm 10 ([c559936](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/c5599361f15c4c82fa999e16a48fcf78e53355a6))
103
- * update CI with pnpm 11 ([f83708f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/f83708f76c3924b8b80dd612965dc49a95d7e18c))
104
- * update CI with pnpm 2 ([235f0fc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/235f0fc8cb35dbe532091d8f545791b8dd05b6be))
105
- * update CI with pnpm 2 ([cb9624e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cb9624e900f555bc07c734ff152c4f4a93000e54))
106
- * update CI with pnpm 3 ([72c25ce](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/72c25cefa2aea6767d5a71b5470955a18f9036b9))
107
- * update CI with pnpm 4 ([fff355a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fff355a8e047d766121d255881d891fa7c5a754e))
108
- * update CI with pnpm 4 ([facd58b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/facd58bdefd530d70fdbb2f7d48c9962ca2195e5))
109
- * update CI with pnpm 5 ([03d9d90](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/03d9d906e852927496a58504dd9c7448e31878a1))
110
- * update CI with pnpm 6 ([b5e7066](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/b5e7066ec840edfa7d6df6c6ab978c61b356c8b5))
111
- * update CI with pnpm 8 ([20c3a5b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/20c3a5be9d465537240cce6ac5346554667cda68))
112
- * update CI with pnpm 9 ([5160fd3](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/5160fd3e1a010a5b52b99d0e2e0de3b9035d1e88))
113
- * update docs and tests ([7a46c21](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7a46c21346d878df88283071551f06a34d71eb9a))
85
+ - add files ([d8a2474](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d8a24747a6a2a12e2709d017dd36c7b80b2ad49f))
86
+ - add more comments ([fb2f105](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fb2f10588566fad042d2e8da4999cf7bf591555d))
87
+ - add new invalidation logic for fetch requests + new tests ([9d0d1d2](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9d0d1d2eafb785dbe91b172358a19494c623cc68))
88
+ - add new tests ([836b882](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/836b88249365ea8745ca839a7dc3a3a4a77732e6))
89
+ - add new tests ([d0e6833](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d0e68335ce13827f74ed1be5b115f7351beebd47))
90
+ - adding a test page ([d4c8a8c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d4c8a8caaba7f4e5003606860babd9e50c6ed99a))
91
+ - adding comfortable cache testing tool on homepage ([340d5cb](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/340d5cbc929ea8dcdbef2a949e1656d014d1f3bb))
92
+ - adding nextjs unit tests ([368ec75](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/368ec755a8532a52526e3364cc02f64b7d4245fa))
93
+ - changed ([8501a4e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/8501a4ee963975f32661789e31281785cf01519a))
94
+ - changed hook ([92f9d3c](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/92f9d3c4b8d9afd6bbbb9cc3a69138823f4d4f87))
95
+ - changed hook ([6b32f0a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/6b32f0abcda935046e61242ba633728bcf23a460))
96
+ - extend and fix caching + chore: update readme ([7ef38a8](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7ef38a8ed2a20957cc78ffa213be3cb334736b19))
97
+ - extend tests ([db9bb85](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/db9bb85e398a7d6e1ba522b990de7e5e241b54b6))
98
+ - improve flaky ms sync delay ([6655884](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/665588474a09f1eb4f4683d2e107ec8b5b36b39a))
99
+ - improve readme ([926493a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/926493a198d15e32e5e4b5c619375df85c646f1c))
100
+ - improve tests ([3fcfadf](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3fcfadf49389fe8a7218417fb79ec74445e76cb7))
101
+ - remove unnecessary revalidatedTagsMap ([7b5c313](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7b5c313e91b5157f113085be75dceba8013c0e81))
102
+ - test is running ([6091471](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/6091471a12f954e3da4bd94db0929b0bd2cfd701))
103
+ - tests ([bd6904e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/bd6904e94a43cfac183a5ec86cbbea0f4e40a816))
104
+ - tests 2 ([974c952](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/974c952587a9d330934f49b26db84c037b3695f5))
105
+ - update CI with pnpm ([c1b0b33](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/c1b0b33417b416bd7755b6b2f43d0b9bea5c7690))
106
+ - update CI with pnpm ([d850377](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/d85037706876dcb036bb6f952a48937c3e96cba3))
107
+ - update CI with pnpm 10 ([c559936](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/c5599361f15c4c82fa999e16a48fcf78e53355a6))
108
+ - update CI with pnpm 11 ([f83708f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/f83708f76c3924b8b80dd612965dc49a95d7e18c))
109
+ - update CI with pnpm 2 ([235f0fc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/235f0fc8cb35dbe532091d8f545791b8dd05b6be))
110
+ - update CI with pnpm 2 ([cb9624e](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/cb9624e900f555bc07c734ff152c4f4a93000e54))
111
+ - update CI with pnpm 3 ([72c25ce](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/72c25cefa2aea6767d5a71b5470955a18f9036b9))
112
+ - update CI with pnpm 4 ([fff355a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/fff355a8e047d766121d255881d891fa7c5a754e))
113
+ - update CI with pnpm 4 ([facd58b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/facd58bdefd530d70fdbb2f7d48c9962ca2195e5))
114
+ - update CI with pnpm 5 ([03d9d90](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/03d9d906e852927496a58504dd9c7448e31878a1))
115
+ - update CI with pnpm 6 ([b5e7066](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/b5e7066ec840edfa7d6df6c6ab978c61b356c8b5))
116
+ - update CI with pnpm 8 ([20c3a5b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/20c3a5be9d465537240cce6ac5346554667cda68))
117
+ - update CI with pnpm 9 ([5160fd3](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/5160fd3e1a010a5b52b99d0e2e0de3b9035d1e88))
118
+ - update docs and tests ([7a46c21](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/7a46c21346d878df88283071551f06a34d71eb9a))
114
119
 
115
120
  ## [1.2.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.2.0...v1.2.1) (2025-03-28)
116
121
 
117
-
118
122
  ### Bug Fixes
119
123
 
120
- * imports ([41f0cf9](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/41f0cf97506c134f8dfb37fab746cc9c066c515f))
124
+ - imports ([41f0cf9](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/41f0cf97506c134f8dfb37fab746cc9c066c515f))
121
125
 
122
126
  # [1.2.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.1.3...v1.2.0) (2025-03-28)
123
127
 
124
-
125
128
  ### Features
126
129
 
127
- * add tsup ([ccf122a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/ccf122a243fade016b6b2d544acec4098222becd))
128
- * add tsup ([2dffad6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2dffad68401bc273cf81a0a0d06446d34b574a5e))
130
+ - add tsup ([ccf122a](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/ccf122a243fade016b6b2d544acec4098222becd))
131
+ - add tsup ([2dffad6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2dffad68401bc273cf81a0a0d06446d34b574a5e))
129
132
 
130
133
  ## [1.1.3](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.1.2...v1.1.3) (2025-03-28)
131
134
 
132
-
133
135
  ### Bug Fixes
134
136
 
135
- * Update README.md ([0a79274](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/0a79274e363856f07b1dce62ec74b54ad92a946e))
137
+ - Update README.md ([0a79274](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/0a79274e363856f07b1dce62ec74b54ad92a946e))
136
138
 
137
139
  ## [1.1.2](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.1.1...v1.1.2) (2025-03-28)
138
140
 
139
-
140
141
  ### Bug Fixes
141
142
 
142
- * Update package.json ([3775c36](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3775c36f3c110686856f8644315ca6e02a3c483f))
143
+ - Update package.json ([3775c36](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/3775c36f3c110686856f8644315ca6e02a3c483f))
143
144
 
144
145
  ## [1.1.1](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.1.0...v1.1.1) (2025-03-28)
145
146
 
146
-
147
147
  ### Bug Fixes
148
148
 
149
- * Update package.json ([bf17b41](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/bf17b4186c8b7d94be83c61b5d4f8622ac7cf7f0))
149
+ - Update package.json ([bf17b41](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/bf17b4186c8b7d94be83c61b5d4f8622ac7cf7f0))
150
150
 
151
151
  # [1.1.0](https://github.com/trieb-work/nextjs-turbo-redis-cache/compare/v1.0.0...v1.1.0) (2025-03-28)
152
152
 
153
-
154
153
  ### Features
155
154
 
156
- * Update README.md ([10b474b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/10b474b456803be924bf4170b6cda662827202c4))
155
+ - Update README.md ([10b474b](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/10b474b456803be924bf4170b6cda662827202c4))
157
156
 
158
157
  # 1.0.0 (2025-03-28)
159
158
 
160
-
161
159
  ### Bug Fixes
162
160
 
163
- * double sync on key expiration ([14afef6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/14afef6b08e3399a2aa7d6cf42a4b9b7b5ea5d33))
164
- * lint errors ([2b9b138](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2b9b138759f5754577205b58a998cc034b3b0db5))
165
- * rEADME ([9e4fab1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9e4fab163002c34e8077285064c24ee05ba92bac))
166
-
161
+ - double sync on key expiration ([14afef6](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/14afef6b08e3399a2aa7d6cf42a4b9b7b5ea5d33))
162
+ - lint errors ([2b9b138](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/2b9b138759f5754577205b58a998cc034b3b0db5))
163
+ - rEADME ([9e4fab1](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/9e4fab163002c34e8077285064c24ee05ba92bac))
167
164
 
168
165
  ### Features
169
166
 
170
- * add handler code ([72251f5](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/72251f58446ec6fb3819ea0bdd67fc012e8a5c38))
171
- * add handler code ([f674f26](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/f674f262f292e47fd228a827590e8dc10391e5cb))
172
- * add handler code ([24c497f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/24c497f1d67898e64528105c61a90b00f55ba02a))
173
- * improve readme and remove logs ([79408fb](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/79408fbd488db11fcc7472b690f1fff237816da8))
174
- * improve readme and remove logs ([de7a6aa](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/de7a6aa735d6295299d3a5d41d0fd00d64ac6f89))
175
- * rename package and extend readme ([e16bcdc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/e16bcdc6329ee913e1794f2bce05e1e88a08d91b))
176
- * update to next 15 types + feat: add delete sync to deduplication cache ([832c28f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/832c28f1fe0831b87790c2d60e33b314be0adf58))
167
+ - add handler code ([72251f5](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/72251f58446ec6fb3819ea0bdd67fc012e8a5c38))
168
+ - add handler code ([f674f26](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/f674f262f292e47fd228a827590e8dc10391e5cb))
169
+ - add handler code ([24c497f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/24c497f1d67898e64528105c61a90b00f55ba02a))
170
+ - improve readme and remove logs ([79408fb](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/79408fbd488db11fcc7472b690f1fff237816da8))
171
+ - improve readme and remove logs ([de7a6aa](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/de7a6aa735d6295299d3a5d41d0fd00d64ac6f89))
172
+ - rename package and extend readme ([e16bcdc](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/e16bcdc6329ee913e1794f2bce05e1e88a08d91b))
173
+ - update to next 15 types + feat: add delete sync to deduplication cache ([832c28f](https://github.com/trieb-work/nextjs-turbo-redis-cache/commit/832c28f1fe0831b87790c2d60e33b314be0adf58))
package/README.md CHANGED
@@ -18,13 +18,13 @@ This library offers you an easy and high performant caching solution for docker,
18
18
  ## Compatibility
19
19
 
20
20
  This package is compatible with Next.js 15.0.3 and above while using App Router. It is not compatible with Next.js 14.x. or 15-canary or if you are using Pages Router.
21
- Redis need to have Redis Version 2.8.0 or higher and have to be configured with `notify-keyspace-events` to be able to use the key-space notifications feature.
21
+ Redis Server need to have Redis Server Version 2.8.0 or higher and have to be configured with `notify-keyspace-events` to be able to use the key-space notifications feature.
22
22
 
23
23
  Tested versions are:
24
24
 
25
- - 15.0.3
26
- - 15.2.4
27
- - 15.3.2
25
+ - Nextjs 15.0.3 + redis client 4.7.0
26
+ - Nextjs 15.2.4 + redis client 4.7.0
27
+ - Nextjs 15.3.2 + redis client 4.7.0
28
28
 
29
29
  Currently PPR, 'use cache', cacheLife and cacheTag are not tested. Use these operations with caution and your own risk.
30
30
 
@@ -50,6 +50,10 @@ Furthermore there exists the DEBUG_CACHE_HANDLER environment variable to enable
50
50
 
51
51
  There exists also the SKIP_KEYSPACE_CONFIG_CHECK environment variable to skip the check for the keyspace configuration. This is useful if you are using redis in a cloud environment that forbids access to config commands. If you set SKIP_KEYSPACE_CONFIG_CHECK=true the check will be skipped and the keyspace configuration will be assumed to be correct (e.g. notify-keyspace-events Exe).
52
52
 
53
+ KILL_CONTAINER_ON_ERROR_THRESHOLD: Optional environment variable that defines how many Redis client errors should occur before the process exits with code 1. This is useful in container environments like Kubernetes where you want the container to restart if Redis connectivity issues persist. Set to 0 (default) to disable this feature. For example, setting KILL_CONTAINER_ON_ERROR_THRESHOLD=10 will exit the process after 10 Redis client errors, allowing the container orchestrator to restart the container.
54
+
55
+ REDIS_COMMAND_TIMEOUT_MS: Optional environment variable that sets the timeout in milliseconds for Redis commands. If not set, defaults to 5000ms (5 seconds). The value is parsed as an integer, and if parsing fails, falls back to the 5000ms default.
56
+
53
57
  ### Option A: minimum implementation with default options
54
58
 
55
59
  extend `next.config.js` with:
@@ -119,21 +123,22 @@ A working example of above can be found in the `test/integration/next-app-custom
119
123
 
120
124
  ## Available Options
121
125
 
122
- | Option | Description | Default Value |
123
- | ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124
- | redisUrl | Redis connection url | `process.env.REDIS_URL? process.env.REDIS_URL : process.env.REDISHOST ? redis://${process.env.REDISHOST}:${process.env.REDISPORT} : 'redis://localhost:6379'` |
125
- | database | Redis database number to use. Uses DB 0 for production, DB 1 otherwise | `process.env.VERCEL_ENV === 'production' ? 0 : 1` |
126
- | keyPrefix | Prefix added to all Redis keys | `process.env.VERCEL_URL \|\| 'UNDEFINED_URL_'` |
127
- | sharedTagsKey | Key used to store shared tags hash map in Redis | `'__sharedTags__'` |
128
- | timeoutMs | Timeout in milliseconds for Redis operations | `5000` |
129
- | revalidateTagQuerySize | Number of entries to query in one batch during full sync of shared tags hash map | `250` |
130
- | avgResyncIntervalMs | Average interval in milliseconds between tag map full re-syncs | `3600000` (1 hour) |
131
- | redisGetDeduplication | Enable deduplication of Redis get requests via internal in-memory cache. | `true` |
132
- | inMemoryCachingTime | Time in milliseconds to cache Redis get results in memory. Set this to 0 to disable in-memory caching completely. | `10000` |
133
- | defaultStaleAge | Default stale age in seconds for cached items | `1209600` (14 days) |
134
- | estimateExpireAge | Function to calculate expire age (redis TTL value) from stale age | Production: `staleAge * 2`<br> Other: `staleAge * 1.2` |
135
- | socketOptions | Redis client socket options for TLS/SSL configuration (e.g., `{ tls: true, rejectUnauthorized: false }`) | `undefined` |
136
- | clientOptions | Additional Redis client options (e.g., username, password) | `undefined` |
126
+ | Option | Description | Default Value |
127
+ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
128
+ | redisUrl | Redis connection url | `process.env.REDIS_URL? process.env.REDIS_URL : process.env.REDISHOST ? redis://${process.env.REDISHOST}:${process.env.REDISPORT} : 'redis://localhost:6379'` |
129
+ | database | Redis database number to use. Uses DB 0 for production, DB 1 otherwise | `process.env.VERCEL_ENV === 'production' ? 0 : 1` |
130
+ | keyPrefix | Prefix added to all Redis keys | `process.env.VERCEL_URL \|\| 'UNDEFINED_URL_'` |
131
+ | sharedTagsKey | Key used to store shared tags hash map in Redis | `'__sharedTags__'` |
132
+ | timeoutMs | Timeout in milliseconds for Redis operations | `Number.parseInt(process.env.REDIS_COMMAND_TIMEOUT_MS) ?? 5_000 : 5_000` |
133
+ | revalidateTagQuerySize | Number of entries to query in one batch during full sync of shared tags hash map | `250` |
134
+ | avgResyncIntervalMs | Average interval in milliseconds between tag map full re-syncs | `3600000` (1 hour) |
135
+ | redisGetDeduplication | Enable deduplication of Redis get requests via internal in-memory cache. | `true` |
136
+ | inMemoryCachingTime | Time in milliseconds to cache Redis get results in memory. Set this to 0 to disable in-memory caching completely. | `10000` |
137
+ | defaultStaleAge | Default stale age in seconds for cached items | `1209600` (14 days) |
138
+ | estimateExpireAge | Function to calculate expire age (redis TTL value) from stale age | Production: `staleAge * 2`<br> Other: `staleAge * 1.2` |
139
+ | socketOptions | Redis client socket options for TLS/SSL configuration (e.g., `{ tls: true, rejectUnauthorized: false }`) | `{ connectTimeout: timeoutMs }` |
140
+ | clientOptions | Additional Redis client options (e.g., username, password) | `undefined` |
141
+ | killContainerOnErrorThreshold | Number of consecutive errors before the container is killed. Set to 0 to disable. | `Number.parseInt(process.env.KILL_CONTAINER_ON_ERROR_THRESHOLD) ?? 0 : 0` |
137
142
 
138
143
  ## TLS Configuration
139
144
 
package/dist/index.d.mts CHANGED
@@ -52,6 +52,10 @@ type CreateRedisStringsHandlerOptions = {
52
52
  * @default Production: staleAge * 2, Other: staleAge * 1.2
53
53
  */
54
54
  estimateExpireAge?: (staleAge: number) => number;
55
+ /** Kill container on Redis client error if error threshold is reached
56
+ * @default 0 (0 means no error threshold)
57
+ */
58
+ killContainerOnErrorThreshold?: number;
55
59
  /** Additional Redis client socket options
56
60
  * @example { tls: true, rejectUnauthorized: false }
57
61
  */
@@ -75,8 +79,10 @@ declare class RedisStringsHandler {
75
79
  private inMemoryCachingTime;
76
80
  private defaultStaleAge;
77
81
  private estimateExpireAge;
78
- constructor({ redisUrl, database, keyPrefix, sharedTagsKey, timeoutMs, revalidateTagQuerySize, avgResyncIntervalMs, redisGetDeduplication, inMemoryCachingTime, defaultStaleAge, estimateExpireAge, socketOptions, clientOptions, }: CreateRedisStringsHandlerOptions);
82
+ private killContainerOnErrorThreshold;
83
+ constructor({ redisUrl, database, keyPrefix, sharedTagsKey, timeoutMs, revalidateTagQuerySize, avgResyncIntervalMs, redisGetDeduplication, inMemoryCachingTime, defaultStaleAge, estimateExpireAge, killContainerOnErrorThreshold, socketOptions, clientOptions, }: CreateRedisStringsHandlerOptions);
79
84
  resetRequestCache(): void;
85
+ private clientReadyCalls;
80
86
  private assertClientIsReady;
81
87
  get(key: string, ctx: {
82
88
  kind: 'APP_ROUTE' | 'APP_PAGE';
package/dist/index.d.ts CHANGED
@@ -52,6 +52,10 @@ type CreateRedisStringsHandlerOptions = {
52
52
  * @default Production: staleAge * 2, Other: staleAge * 1.2
53
53
  */
54
54
  estimateExpireAge?: (staleAge: number) => number;
55
+ /** Kill container on Redis client error if error threshold is reached
56
+ * @default 0 (0 means no error threshold)
57
+ */
58
+ killContainerOnErrorThreshold?: number;
55
59
  /** Additional Redis client socket options
56
60
  * @example { tls: true, rejectUnauthorized: false }
57
61
  */
@@ -75,8 +79,10 @@ declare class RedisStringsHandler {
75
79
  private inMemoryCachingTime;
76
80
  private defaultStaleAge;
77
81
  private estimateExpireAge;
78
- constructor({ redisUrl, database, keyPrefix, sharedTagsKey, timeoutMs, revalidateTagQuerySize, avgResyncIntervalMs, redisGetDeduplication, inMemoryCachingTime, defaultStaleAge, estimateExpireAge, socketOptions, clientOptions, }: CreateRedisStringsHandlerOptions);
82
+ private killContainerOnErrorThreshold;
83
+ constructor({ redisUrl, database, keyPrefix, sharedTagsKey, timeoutMs, revalidateTagQuerySize, avgResyncIntervalMs, redisGetDeduplication, inMemoryCachingTime, defaultStaleAge, estimateExpireAge, killContainerOnErrorThreshold, socketOptions, clientOptions, }: CreateRedisStringsHandlerOptions);
79
84
  resetRequestCache(): void;
85
+ private clientReadyCalls;
80
86
  private assertClientIsReady;
81
87
  get(key: string, ctx: {
82
88
  kind: 'APP_ROUTE' | 'APP_PAGE';