Session Creation should be Lazy
|Reported by:||dj_tw||Owned by:||nobody|
|Severity:||Keywords:||lazy creation session|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Sessions should only be created when they are needed.
If sessions are not used, a session entry should not be created.
Memcached-backed sessions seemed to be created, even when the session is not written to.
This is what I'm finding when I look at my memcache after hitting a page that does not use sessions.
Thus, if an app uses sessions (but not much), memcache will fill up with empty sessions from the other web visitors even though their requests don't use sessions.
(the same thing might happen with database-backed sessions putting unneeded rows in the database, but I have not checked that).
Change History (3)
comment:1 Changed 6 years ago by dj_tw
- Keywords session added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 6 years ago by mtredinnick
- milestone 1.0.3 deleted
- Triage Stage changed from Unreviewed to Design decision needed