bbangert / beaker

WSGI middleware for sessions and caching
https://beaker.readthedocs.org/
Other
524 stars 143 forks source link

When the session timeout,how can I get the session info by using beaker in bottle #144

Open yasinasama opened 6 years ago

yasinasama commented 6 years ago

I use beaker for session in bottle,and when someone login I recode the username to session.Like:

s = request.environ.get('beaker.session') s["user"] = "someone"

Then here is the situation I encountered:

I set the session.timeout:1800,that means 30 mins later the session will be timeout.When the session timeout.I want to get the value of s["user"] so that I can do something with this value.

In a word,if I can catch something when beaker.session is ready to timeout.