From f6c4c779930cdcab4572fb3fc71956e5934ffe32 Mon Sep 17 00:00:00 2001 From: alma Date: Fri, 25 Apr 2025 12:48:29 +0200 Subject: [PATCH] panel 2 courier api --- app/api/courrier/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/courrier/route.ts b/app/api/courrier/route.ts index e175a5fe..802e8d56 100644 --- a/app/api/courrier/route.ts +++ b/app/api/courrier/route.ts @@ -3,7 +3,7 @@ import { ImapFlow } from 'imapflow'; import { getServerSession } from 'next-auth'; import { authOptions } from '@/app/api/auth/[...nextauth]/route'; import { prisma } from '@/lib/prisma'; -import LRU from 'lru-cache'; +import { LRUCache } from 'lru-cache'; // Define types interface Email { @@ -22,7 +22,7 @@ interface Email { } // Configure efficient caching with TTL -const emailCache = new LRU({ +const emailCache = new LRUCache({ max: 500, // Store up to 500 emails ttl: 1000 * 60 * 5, // Cache for 5 minutes });