mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-05 21:54:47 -04:00
Reduce cache ttl
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user