Re: [RFC][Discussion] Add session_gc()
| From: | Andrey Andreev | Date: | Fri, 08 Apr 2016 07:57:09 +0000 |
| Subject: | Re: [RFC][Discussion] Add session_gc() | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92159@lists.php.net to get a copy of this message | ||
Hi,
On Fri, Apr 8, 2016 at 8:12 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi Andrey,
>
> On Fri, Apr 8, 2016 at 12:46 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> >>
> >> The signature for SessionHandlerInterface::gc() accepts a TTL value as a
> >> parameter; session_gc() can too:
> >>
> >> function session_gc($ttl = ini_get('session.gc_maxlifetime')) {}
> >>
> >> * Note: The current patch doesn't actually ignore gc_probability, but I
> >> think that's by mistake (also relevant to my previous point). I'll
> comment
> >> on the PR on GitHub.
> >
> > Good point.
> > Since session module does the job if module should execute GC or not.
> > It should be 1 or very short time.
>
I don't understand what you're saying here. Is it that gc_maxlifetime
should be 1 second? o.O
>
> 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.
Cheers,
Andrey.