Using awake and sleep
Another strategy for managing session state is to create it at the beginning of the request-response loop and then release it at the end. The session object's awake and sleep methods provide the hooks you need to implement this strategy. A session object receives an awake message at the beginning of the request-response loop (where you can reinitialize the session state) and a sleep message at the end (where you can release it).
Table of Contents Next Section