Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #678 (enhancement)

Opened 3 years ago

Last modified 3 years ago

Session create/delete callbacks are missing from 3.0

Status: closed (toolfix)

Reported by: alex AT alexn id au Assigned to: rdelon
Priority: normal Milestone: 3.1
Component: CherryPy code Keywords: session callback
Cc:

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.

Change History

06/17/07 18:25:51: Modified by fumanchu

  • status changed from new to closed.
  • resolution set to toolfix.
  • milestone set to 3.1.

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 self.id is None)
  • on_renew_session: inside the load method
  • on_delete_session: inside the delete (or _delete) method

Hosted by WebFaction

Log in as guest/cpguest to create tickets