From 629998823e581feb57d0ead3ded4aac4cf6ec111 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:52:10 -0400 Subject: [PATCH] Added More Database Caching --- lib/org-limit.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/org-limit.ts b/lib/org-limit.ts index a274281..64e5ed7 100644 --- a/lib/org-limit.ts +++ b/lib/org-limit.ts @@ -58,6 +58,7 @@ export const hasAvailableCount = async () => { const orgLimit = await db.orgLimit.findUnique({ where: { orgId }, + cacheStrategy: { ttl: 30, swr: 60 }, }); if (!orgLimit || orgLimit.count < MAX_FREE_BOARDS) { @@ -76,6 +77,7 @@ export const getAvailableCount = async () => { const orgLimit = await db.orgLimit.findUnique({ where: { orgId }, + cacheStrategy: { ttl: 30, swr: 60 }, }); if (!orgLimit) {