Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Add scheduler to clean up expired sessions #53

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

interpretor
Copy link
Contributor

Closes #25.

Checklist:

  • issue number linked above after pound (#)
    • replace "Closes " with "Contributes to" or other if this PR does not close the issue
  • manually checked my feature / checking not applicable
  • wrote tests / testing not applicable
  • 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.

@AnthonyRuelle
Copy link

Hi !

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

@AnthonyRuelle
Copy link

Up, please .. @BracketJohn ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup expired sessions
2 participants