Closed RoccoC closed 3 years ago
The expirationInterval doc comment says:
expirationInterval
The interval between checking for expired sessions in seconds. Defaults to 86400 (1 day).
But, the value is actually passed as-is to node's setInterval function, without first multiplying by 1000 (https://github.com/Mrtenz/typeorm-store/blob/master/src/store.ts#L189):
this.expirationIntervalId = setInterval(this.clearExpiredSessions, interval);
This means clearExpiredSessions() is getting called 1000x more times than would be expected given the documentation. :)
clearExpiredSessions()
Just realized there's already a PR to fix this one: https://github.com/Mrtenz/typeorm-store/pull/4
Thanks for the reminder! The fix was merged and deployed to npm.
The
expirationInterval
doc comment says:But, the value is actually passed as-is to node's setInterval function, without first multiplying by 1000 (https://github.com/Mrtenz/typeorm-store/blob/master/src/store.ts#L189):
This means
clearExpiredSessions()
is getting called 1000x more times than would be expected given the documentation. :)