session.gc_maxlifetimeIf set, the probability is
I don’t understand why this regulation is necessary. This does not understand the principle
Discovery session monitors whether the user is active, and then automatically updates the last modification time of the session file.
Therefore, a function was written to read the last modification time of the session file, and then compared with the current time. If it is greater than the set expiration time, it is assumed to be 10 minutes. The information of the corresponding session is cleared. Is this ok?
Is there a better way?
Ps: I mean the expiration time when there is no activity.
Ps: My question does not consider setting an independent expiration time for the value of each session;
I recommend you to have a look.@LaruenceGreat Spirit’s ArticlesHow to set up a strictly 30-minute expired Session
Another article is attached:A small probability Notice of Session Gc with in-depth understanding of PHP principles