mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-04 04:33:10 +00:00
Added Redis for Caching and Started Database Query Caching Migration to Redis
This commit is contained in:
parent
f99360d9b9
commit
0f899cb34f
12 changed files with 260 additions and 632 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue