nuxt-session
nuxt-session copied to clipboard
Add scheduler to clean up expired sessions
Closes #25.
Checklist:
- [x] issue number linked above after pound (
#)- replace "Closes " with "Contributes to" or other if this PR does not close the issue
- [x] manually checked my feature / checking not applicable
- [x] wrote tests / testing not applicable
- [x] attached screenshots / screenshot not applicable
As unstorage doesn't implement a touch/expire functionality, we need to check periodically for expired sessions. A simple cron job iterating over the keys with our prefix in the storage will check if the session is expired, and then delete it from the store.
I hardcoded a fixed cleanup interval, we could discuss if this should be configurable or set to another value other than every minute.
Hi !
Why is this PR not merged yet? I also noticed this problem ..
Up, please .. @BracketJohn ?