refactor: Remove all code related to the old cache system (#25284)

* chore: Remove all code related to the old cache system

* Removed some redundant tests, some type fixes

* Further type fixes

* More type fixes re. tests

* Next iteration, couple of fixes remaining

* Remove cache from CredentialActionsDropdown

* Fix tests by mocking credential, instead of db queries

* Remove Cache DI wiring from v2

* Make sure apiv2 build passes

* Remove another cache cron

* Remove old tokens for calendar-cache v1
This commit is contained in:
Alex van Andel authored and GitHub committed 2025-11-20 18:02:18 +02:00
1 parent d1184f65e2
commit ae7fd0cae2
45 files changed
+58 -2765

No files matched your search

@@ -5,7 +5,6 @@ import { NextResponse } from "next/server";
import { z } from "zod";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { CalendarCache } from "@calcom/features/calendar-cache/calendar-cache";
import {
getCalendarCredentials,
getConnectedCalendars,
@@ -92,15 +91,9 @@ async function deleteHandler(req: NextRequest) {
const user = await authMiddleware();
const searchParams = Object.fromEntries(req.nextUrl.searchParams.entries());
const { integration, externalId, credentialId, eventTypeId } =
const { integration, externalId, eventTypeId } =
selectedCalendarSelectSchema.parse(searchParams);
const calendarCacheRepository = await CalendarCache.initFromCredentialId(credentialId);
await calendarCacheRepository.unwatchCalendar({
calendarId: externalId,
eventTypeIds: [eventTypeId ?? null],
});
await SelectedCalendarRepository.delete({
where: {
userId: user.id,