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

From: Date: Fri, 03 Jan 2014 23:10:14 +0000
Subject: Re: Re: [RFC] Introduce session.lock, session.lazy_write and session.lazy_destory
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-70995@lists.php.net to get a copy of this message
Hi all, On Fri, Jan 3, 2014 at 11:23 AM, Rowan Collins <rowan.collins@gmail.com>wrote: > On 02/01/2014 20:46, Yasuo Ohgaki wrote: > >> I've added session_discard() to RFC that discards changes made to >> session data and close session. >> >> Since there is session_commit(), >> >> http://www.php.net/manual/en/function.session-commit.php >> >> session_abort() may be better name for it. >> Any comment? >> > > Since session_commit() is an alias for session_write_close(), the new > function should probably also have "close" in its name (although oddly we > "start" a session, rather than "open" it). > > Both "discard" and "abort" also sound a bit like destroying the session > itself to me, rather than just ignoring the current changes to it. > > Perhaps something like session_revert_close() - "revert" being a closely > analagous action in version control systems. session_revert_close() sounds reasonable if session_write_close() is main function. Rather than session_start(), session_open() would be better name, since there is session_write_close(). IIRC, session_write_close() was considered odd name and session_commit() is made as alias of it later. Expect-able/consistent function names may be better as main function and document them for new release. We should be careful not to have too many aliases, though. Main functions session_start() (or session_open()?) session_write_close() session_revert_close() Aliases session_open() (or session_start()?) session_commit() session_abort() Introducing session_revert_close() only seems good to me, but I don't mind to have session_open()/session_abort() at all. Any comments? Choosing good names is difficult ;-) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#70995) next »