Reduce cache ttl

This commit is contained in:
MartinBraquet
2025-07-31 23:51:33 +02:00
parent d09e9af657
commit a2aea7837e
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ export async function GET(
const params = await context.params;
const { id } = params;
const cacheStrategy = { swr: 3600, ttl: 3600, tags: ["profiles_id"] };
const cacheStrategy = { swr: 60, ttl: 60, tags: ["profiles_id"] };
const user = await prisma.user.findUnique({
where: { id },
select: {

View File

@@ -118,7 +118,7 @@ export async function GET(request: Request) {
}
// Fetch paginated and filtered profiles
const cacheStrategy = { swr: 3600, ttl: 3600 , tags: ["profiles"]};
const cacheStrategy = { swr: 60, ttl: 60 , tags: ["profiles"]};
const profiles = await prisma.user.findMany({
skip: offset,
take: profilesPerPage,