Re: Re: Revert session_serializer_name(), session_gc()

From: Date: Fri, 14 Mar 2014 01:30:15 +0000
Subject: Re: Re: Revert session_serializer_name(), session_gc()
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Andrey,

On Fri, Mar 14, 2014 at 8:16 AM, Andrey Andreev <[email protected]> wrote:

> > I think shared lock is useful. It requires additional work to change save
> > handler interface and save handler code. It's a distinct feature from
> > read_only. You can get status via session_status() if you need to know
> > during execution. i.e. If session is started with read_only, you'll get
> > PHP_SESSION_NONE status.
>
> This is a bug.
> A read-only session is not a non-existing session.
>

This is not a bug.

session_start(['read_only'=>true])

is the same as

session_start();
session_commit();

It's much faster because no additional API call nor write to session
storage.


>
> I'm thinking more of something like a SessionHandler::$isReadOnly property.
>
> > I suppose read_only is good enough name for the feature. I appreciate
> better
> > name for it, if there is.
>
> It is a perfect name, no need to change it.
>
> >
> > Although I would not like to propose/implement the RFC now, but I may
> > implement it if RFC passes.
>
> Great, I'll count on that. :)


I have to think about the use case if it's really useful, but I may
implement  shared lock if RFC passes.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (41 messages)

« previous php.internals (#73139) next »