1.11.7.2 Destroying Sessions

Once a session has expired the data cannot be accessed by the session module. If a user tries to access an expired session, the session is destroyed immediately.

You can also manually destroy the session using the destroy() method. However it is highly recommended that you do not destroy sessions in this way as other applications may be using the session and my crash if during the course of program execution the session information is removed. Instead you can use the empty() method of the store instance to remove all store information for your application whilst leaving the session and other application's information safe:

store.empty()

If you do wish to destroy a session and understand the risks you can use:

manager.destroy(ignoreWarning=True)

failing to specify ignoreWarning as True will result in a SessionWarning being raised to inform you of the potential dangers.