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 8 years ago by
|Patch needs improvement:||unset|