move caching time constant to API

This commit is contained in:
Agusti Fernandez Pardo
2022-06-14 19:48:47 +02:00
parent ab6a99749f
commit f3d7922efd
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
export const PRISMA_CLIENT_CACHING_TIME = 1000 * 60 * 60 * 24;
+1 -1
View File
@@ -2,9 +2,9 @@ import { hash } from "bcryptjs";
import cache from "memory-cache";
import { NextMiddleware } from "next-api-middleware";
import { PRISMA_CLIENT_CACHING_TIME } from "@calcom/api/lib/constants";
import { prismaAdmin } from "@calcom/console/modules/common/utils/prisma";
import { asStringOrUndefined } from "@calcom/lib/asStringOrNull";
import { PRISMA_CLIENT_CACHING_TIME } from "@calcom/lib/constants";
import { prisma, customPrisma } from "@calcom/prisma";
// This replaces the prisma client for the cusotm one if the customCredentialsId is valid