Issue #678 resolved

Session create/delete callbacks are missing from 3.0

Anonymous created an issue

The session management callbacks on_create_session, on_renew_session, on_delete_session (as described in 1.4.6 of the CherryPy book) are not in tools.sessions for 3.0.

Reported by alex AT alexn id au

Comments (2)

  1. Robert Brewer

    I'd rather see this addressed by having different Session classes available, first on the tools wiki, and then, if one or two become pre-eminent, distribute those as alternatives with CP.

    Assuming one is using the current Session class as a base, you can place custom logic in the following methods:

    • on_create_session: inside __init__ (when is None)
    • on_renew_session: inside the load method
    • on_delete_session: inside the delete (or _delete) method
  2. Log in to comment