bbangert / beaker

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

session was not delete from persistent storage. #68

Open xieyu opened 10 years ago

xieyu commented 10 years ago

def delete(self): """Deletes the session from the persistent storage, and sends an expired cookie out""" if self.use_cookies: self._delete_cookie() self.clear()

pszalanski commented 8 years ago

Yes, I ran into the same issue. I have a Redis beaker backend and the sessions keep piling up. delete() should have a statement like

del self.namespace['session']
schlenk commented 4 years ago

The clear method in _ConfigurableSession() assumes that a clear() on its superclass (dict) would call delitem, but it does not. So the session stays in persistent storage. This is insidious when using regenerate_id() as the old ID stays valid!