refactor: decrease visitor expiry duration
All checks were successful
create archive with lfs / tag (push) Successful in 5s
All checks were successful
create archive with lfs / tag (push) Successful in 5s
This commit is contained in:
parent
19bb57bc03
commit
747b648c12
@ -10,7 +10,7 @@ const visitCount = writable(parseInt(existsSync(visitCountFile) ? readFileSync(v
|
|||||||
|
|
||||||
type Visitor = { visits: number[] }
|
type Visitor = { visits: number[] }
|
||||||
const lastVisitors = writable<Map<string, Visitor>>(new Map())
|
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) => {
|
export const incrementVisitCount = (request: Request, cookies: Cookies) => {
|
||||||
let currentVisitCount = get(visitCount)
|
let currentVisitCount = get(visitCount)
|
||||||
|
Loading…
Reference in New Issue
Block a user