Open xieyu opened 10 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']
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!
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()