Added Redis for Caching and Started Database Query Caching Migration to Redis

This commit is contained in:
Ahmad 2025-01-18 19:14:19 -05:00
parent f99360d9b9
commit 0f899cb34f
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
12 changed files with 260 additions and 632 deletions

View file

@ -2,6 +2,7 @@ import { auth, currentUser } from '@clerk/nextjs/server';
import { ACTION, ENTITY_TYPE } from '@prisma/client';
import { db } from '@/lib/db';
import { revalidateTag } from 'next/cache';
interface Props {
entityId: string;
@ -31,6 +32,8 @@ export const createAuditLog = async (props: Props) => {
userName: user?.firstName + ' ' + user?.lastName,
},
});
revalidateTag(`card-logs-${entityId}`);
} catch (error) {
console.error('[AUDIT_LOG_ERROR]', error);
}