Opened 16 years ago
Closed 15 years ago
#10455 closed (worksforme)
Session Creation should be Lazy
Reported by: | dj_tw | Owned by: | nobody |
---|---|---|---|
Component: | contrib.sessions | Version: | 1.0 |
Severity: | Keywords: | lazy creation session | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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 by , 16 years ago
Keywords: | session added |
---|
comment:2 by , 16 years ago
milestone: | 1.0.3 |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:3 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This issue appears to be resolved already.
This is going to be very tricky to organise, since the only way to tell if a particular session key is in use when creating new ones is to check if a session object exists.
(Removing milestone, as it's an enhancement item, not a functionality bug for 1.0.X).