From 747b648c124ab91e111315d13169436e4a2f1ad7 Mon Sep 17 00:00:00 2001 From: dusk Date: Thu, 16 Jan 2025 16:29:24 +0300 Subject: [PATCH] refactor: decrease visitor expiry duration --- src/lib/visits.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/visits.ts b/src/lib/visits.ts index 14b582d..8e75f8b 100644 --- a/src/lib/visits.ts +++ b/src/lib/visits.ts @@ -10,7 +10,7 @@ const visitCount = writable(parseInt(existsSync(visitCountFile) ? readFileSync(v type Visitor = { visits: number[] } const lastVisitors = writable>(new Map()) -const VISITOR_EXPIRY_SECONDS = 60 * 60 * 1 +const VISITOR_EXPIRY_SECONDS = 60 * 30 // half an hour seems reasonable export const incrementVisitCount = (request: Request, cookies: Cookies) => { let currentVisitCount = get(visitCount)