pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
488 stars 236 forks source link

SQL cleanup thread or per requests #211

Closed Lxstr closed 4 months ago

Lxstr commented 4 months ago

Have added option for either a background thread or per-request cleanup for SQL. Initially I thought this is out of scope for flask-session, but thought it might be worth to try. There have been some PRs for per-request cleanup but I thought this would have less desirable so also tried the threads option. It may be that we implement only that one.

Lxstr commented 4 months ago

Added app command option. Abstracted so that new session interfaces only have to implement the delete_session method.