Re: [RFC][Discussion] Add session_gc()
| From: | Yasuo Ohgaki | Date: | Fri, 08 Apr 2016 08:38:55 +0000 |
| Subject: | Re: [RFC][Discussion] Add session_gc() | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92162@lists.php.net to get a copy of this message | ||
Hi Andrey,
On Fri, Apr 8, 2016 at 5:02 PM, Andrey Andreev <narf@devilix.net> wrote:
> On Fri, Apr 8, 2016 at 6:46 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
>>
>> ,,,
>>
>> >
>> > Speaking of the documentation part - it's not hard to imagine A LOT of
>> > people doing this:
>> >
>> > session_start();
>> > session_gc();
>> >
>> > That's not a small problem.
>>
>> Shooting their own foot is not our problem, but leaving obsolete and
>> possibly active session is ours.
>>
>
> If you want to explicitly document something as a best practice, it IS your
> problem when users shoot their feet with it
Lack of proper API for required task is our problem. Misuse is not ours. IMHO.
The best way to perform GC would be cron task. Low traffic sites can
make sure obsolete session is deleted. High traffic site can avoid
occasional slow down by GC. I suppose almost all high traffic sites
uses memcached or like that does not require PHP's session GC at all,
though.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net