refactor: decrease visitor expiry duration
All checks were successful
create archive with lfs / tag (push) Successful in 5s

This commit is contained in:
dusk 2025-01-16 16:29:24 +03:00
parent 19bb57bc03
commit 747b648c12
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw

View File

@ -10,7 +10,7 @@ const visitCount = writable(parseInt(existsSync(visitCountFile) ? readFileSync(v
type Visitor = { visits: number[] }
const lastVisitors = writable<Map<string, Visitor>>(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)