chore: Implement short-lived redis cache for slots (#22787)

* chore: Implement short-lived redis cache for slots

* chore: adapt apiv2 redis service to match with upstash redis

* chore: safer redis service and ms ttl

* fixup! chore: safer redis service and ms ttl

* Wrap with timeout, currently doesn't work yet

* Updated @upstash/redis for better signal support

* Fix type errors, remove ts value

* Inject NoopRedisService for NODE_ENV test

* chore: bump platform libs

* chore: bump platform libs

* Upstash Redis upgrade no longer resulted in expected hard crash on init, so updated factory and our Upstash Redis Adapter to mimick old behaviour

* Add SLOTS_CACHE_TTL variable for configurable ttl on slots cache

* Update parseInt to use right types

* chore: bump platform libs

* chore: bump platform libs

* chore: bump platform libs

* update e2e api v2 action

* set SLOTS_CACHE_TTL env var api v2 e2e

---------

Co-authored-by: cal.com <[email protected]>
This commit is contained in:
Alex van Andelandcal.com authored and GitHub committed 2025-08-05 17:32:02 +00:00
1 parent a71d949a0c
commit b71d8baccc
19 files changed
+276 -41

No files matched your search

+18 -18
View File
@@ -2500,7 +2500,7 @@ __metadata:
"@axiomhq/winston": ^1.2.0
"@calcom/platform-constants": "*"
"@calcom/platform-enums": "*"
"@calcom/platform-libraries": "npm:@calcom/[email protected]3"
"@calcom/platform-libraries": "npm:@calcom/[email protected]5"
"@calcom/platform-types": "*"
"@calcom/platform-utils": "*"
"@calcom/prisma": "*"
@@ -3556,13 +3556,13 @@ __metadata:
languageName: unknown
linkType: soft
"@calcom/platform-libraries@npm:@calcom/[email protected]3":
version: 0.0.283
resolution: "@calcom/platform-libraries@npm:0.0.283"
"@calcom/platform-libraries@npm:@calcom/[email protected]5":
version: 0.0.285
resolution: "@calcom/platform-libraries@npm:0.0.285"
dependencies:
"@calcom/features": "*"
"@calcom/lib": "*"
checksum: 7d741bd13ac050f8552855658b2348cba0999529c12ca6741e5f802a7bc9ce4e29c9ac69a17306c42beb392f17acb7b5f8a0554b8d2ea9b5fc6d963950d0fca8
checksum: 2faebf08e2565a1eb75e70a1bf68af3a7593b8a2c35f4d05af97fdfba7fda6fba962984934a47c3a7fbf0a1a5b4f1ca4dd89029d710b6684b0f6fafa96526e11
languageName: node
linkType: hard
@@ -4076,7 +4076,7 @@ __metadata:
"@types/turndown": ^5.0.1
"@types/uuid": 8.3.1
"@unkey/ratelimit": ^0.1.1
"@upstash/redis": ^1.21.0
"@upstash/redis": ^1.35.2
"@vercel/edge-config": ^0.1.1
"@vercel/edge-functions-ui": ^0.2.1
"@vercel/og": ^0.6.3
@@ -18784,12 +18784,12 @@ __metadata:
languageName: node
linkType: hard
"@upstash/redis@npm:^1.21.0":
version: 1.30.1
resolution: "@upstash/redis@npm:1.30.1"
"@upstash/redis@npm:^1.35.2":
version: 1.35.2
resolution: "@upstash/redis@npm:1.35.2"
dependencies:
crypto-js: ^4.2.0
checksum: 1d8083650fbc1760fe4c58d263c62f9c658d08035480927316932df2757f4e987799f7ce752579e7dd871155e96996bb4caf8ad1034af3ab18965d7ca76421cf
uncrypto: ^0.1.3
checksum: 1d54217589418873702f08bdc27d9455ea44df0fce30ace612b5637a1c4c261b762a80fb85d7b3c72d3213e82b8938bb57c413ae44f9f1e713eeab3f31d5539a
languageName: node
linkType: hard
@@ -23319,13 +23319,6 @@ __metadata:
languageName: node
linkType: hard
"crypto-js@npm:^4.2.0":
version: 4.2.0
resolution: "crypto-js@npm:4.2.0"
checksum: f051666dbc077c8324777f44fbd3aaea2986f198fe85092535130d17026c7c2ccf2d23ee5b29b36f7a4a07312db2fae23c9094b644cc35f7858b1b4fcaf27774
languageName: node
linkType: hard
"crypto-random-string@npm:^2.0.0":
version: 2.0.0
resolution: "crypto-random-string@npm:2.0.0"
@@ -45439,6 +45432,13 @@ __metadata:
languageName: node
linkType: hard
"uncrypto@npm:^0.1.3":
version: 0.1.3
resolution: "uncrypto@npm:0.1.3"
checksum: 07160e08806dd6cea16bb96c3fd54cd70fc801e02fc3c6f86980144d15c9ebbd1c55587f7280a207b3af6cd34901c0d0b77ada5a02c2f7081a033a05acf409e2
languageName: node
linkType: hard
"undici-types@npm:~6.19.2":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"