mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 09:03:36 +00:00
Added More Database Caching
This commit is contained in:
parent
d30d95668e
commit
629998823e
1 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,7 @@ export const hasAvailableCount = async () => {
|
||||||
|
|
||||||
const orgLimit = await db.orgLimit.findUnique({
|
const orgLimit = await db.orgLimit.findUnique({
|
||||||
where: { orgId },
|
where: { orgId },
|
||||||
|
cacheStrategy: { ttl: 30, swr: 60 },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!orgLimit || orgLimit.count < MAX_FREE_BOARDS) {
|
if (!orgLimit || orgLimit.count < MAX_FREE_BOARDS) {
|
||||||
|
@ -76,6 +77,7 @@ export const getAvailableCount = async () => {
|
||||||
|
|
||||||
const orgLimit = await db.orgLimit.findUnique({
|
const orgLimit = await db.orgLimit.findUnique({
|
||||||
where: { orgId },
|
where: { orgId },
|
||||||
|
cacheStrategy: { ttl: 30, swr: 60 },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!orgLimit) {
|
if (!orgLimit) {
|
||||||
|
|
Loading…
Reference in a new issue