Re: [VOTE] Introduce session.lock, session.lazy_write and session.lazy_destory

From: Date: Mon, 20 Jan 2014 14:18:06 +0000
Subject: Re: [VOTE] Introduce session.lock, session.lazy_write and session.lazy_destory
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Mon, 2014-01-20 at 17:42 +0900, Yasuo Ohgaki wrote:
> Hi Bas,
> 
> On Mon, Jan 20, 2014 at 5:27 PM, Bas van Beek <[email protected]> wrote:
> 
> > I see only one very simple function potentially being helpful. A simple
> > session close without write maybe called session_close(). This would give
> > a performance bonus as it will not need to serialize the session data and
> > write it back to session storage. It also helps to programmer in cases
> > that he wants to guarantee that the session store is not changed by
> > script (similar to a transaction abort).
> >
> 
> I have already added this as session_abort().
> Since it's only in 5.6 and master branch, the name could be changed.
> However, session_abort() (or something like session_discard()) would be
> better name because the name implies it does not save data.
> 
> If you come up with better name, please let me know.

I think those two are useful:

  - session_abort() - close session, do *not* write, unlock file
  - session_close() - close session, *do* write, unlock file

I do think this also should be application defined, not configuration
defined. So using functions for that is better than ini options. Only
the individual script nows what it needs, global configuration for
tuning one application will break another on the same system and makes
it harder to write portable appliations.

johannes




Thread (42 messages)

« previous php.internals (#71324) next »