Ticket #767 (defect)
Opened 6 months ago
Last modified 6 months ago
Replace sessions.py with something good
Status: assigned
| Reported by: | fumanchu | Assigned to: | fumanchu (accepted) |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | sessions | Keywords: | |
| Cc: |
The session library in CP isn't very good: it's hard to extend, partly because IMO it tries to do too much. For example, it shouldn't try to allow both eager and lazy locking. It also does too much at the class level instead of the instance level; that is, instead of instantiating a Session object per request, it should just stick all that state into cherrypy.request--it would then be free to instantiate a FileSession? object per Application, rather than using class variables to manage config across requests.
Change History
01/13/08 19:57:05: Modified by fumanchu
- owner changed from rdelon to fumanchu.
- status changed from new to assigned.


It might also be good to move cherrypy.session to cherrypy.request.session. This would make it clear that the session is serving-scoped, and also simplify the implementation (by removing the _ThreadLocalProxy). Another solution would be to just ditch the proxy and go with cherrypy.serving.session (which the implementation already uses anyway).