developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 14 years ago

Last modified 9 years ago

#490 assigned enhancement

Do not create session when it is not necessary — at Initial Version

Reported by: laurentj Owned by: Julien
Priority: low Milestone:
Component: jelix:core:jSession Version: 1.0.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

Sometimes, on a web site, sessions are not required, or only when a module would like to store something in it. So, for some visitors, sessions are created even if it is not used. This is a perf issue : it create a file or a record which is not useful.

We could have jSession::get($varname) and jSession::set($varname, $value) to read or save session variables. So we use them instead of using directly $_SESSION, and there isn't a session_start sytematically.

session_start is called only when calling jSession::set. When we call jSession::get, it should detect if there is a cookie of session. If yes, it execute session_start and return the value from $_SESSION, else it just returns null or "".

Change History (0)

Note: See TracTickets for help on using tickets.