nuxt-session icon indicating copy to clipboard operation
nuxt-session copied to clipboard

Add scheduler to clean up expired sessions

Open interpretor opened this issue 3 years ago • 2 comments

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.

interpretor avatar Dec 01 '22 13:12 interpretor

Hi !

Why is this PR not merged yet? I also noticed this problem ..

AnthonyRuelle avatar Aug 03 '23 07:08 AnthonyRuelle

Up, please .. @BracketJohn ?

AnthonyRuelle avatar Aug 14 '23 14:08 AnthonyRuelle