Hi Andrey, On Fri, Apr 8, 2016 at 6:54 PM, Andrey Andreev <n...@devilix.net> wrote: > On Fri, Apr 8, 2016 at 12:29 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: >> >> Hi Andrey, >> >> On Fri, Apr 8, 2016 at 6:20 PM, Andrey Andreev <n...@devilix.net> wrote: >> > On Fri, Apr 8, 2016 at 11:33 AM, Yasuo Ohgaki <yohg...@ohgaki.net> >> > wrote: >> >> >> >> Hi Andrey, >> >> >> >> On Fri, Apr 8, 2016 at 4:57 PM, Andrey Andreev <n...@devilix.net> >> >> wrote: >> >> >> >> >> >> PS(gc_maxlifetime) is needed, so I fixed the last commit. >> >> >> >> >> > >> >> > It is necessary for probability-triggered GC because you don't have >> >> > another >> >> > way of giving a TTL value then, but that's not the case for a direct >> >> > session_gc() call. >> >> >> >> PS(gc_maxlifetime) is not related directly to probability based GC, >> >> but it's about which session should be deleted. >> >> >> >> Save handlers are supposed to delete inactive sessions exceeds >> >> PS(gc_maxlifetime) when GC is issued. Save handlers are not suppose to >> >> use PS(vars) directly and should use passed TTL parameter. Therefore, >> >> the parameter is passed. >> >> >> > >> > It is not directly related to gc_probability it is very obviously the >> > result >> > gc_probability-based design. >> > >> > Still, even if we agree to disagree on that, it's not a blocker for >> > maxlifetime being overridable via a parameter. >> >> We need TTL value and the TTL is gc_maxlifetime. >> How would you specify session data to be removed? >> >> TTL value is mandatory. > > > > I wrote this pseudo-code in my very first reply to this thread ... > > function session_gc($ttl = ini_get('session.gc_maxlifetime')) {} > > If that's unclear, here's a more verbose way to put it: > > function session_gc($ttl = null) > { > if (empty($ttl)) > { > $ttl = ini_get('session.gc_maxlifetime'); > } > > // ... > } > > It just gives the ability to override the INI value for those who don't want > or need it.
I thought you claim that use of gc_maxlifetime is wrong. 3. If session_gc() bypasses the gc_probability, gc_divisor INI settings*, then why does it still rely on gc_maxlifetime? Anyway, you're suggesting session_gc() should have $ttl = ini_get('session.gc_maxlifetime') as the TTL parameter. This sounds reasonable and I'll add optional 1st parameter. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php