Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73207 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85039 invoked from network); 17 Mar 2014 09:32:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 09:32:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.43 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.43 mail-la0-f43.google.com Received: from [209.85.215.43] ([209.85.215.43:33701] helo=mail-la0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/60-17561-A11C6235 for ; Mon, 17 Mar 2014 04:32:11 -0500 Received: by mail-la0-f43.google.com with SMTP id e16so3474011lan.16 for ; Mon, 17 Mar 2014 02:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9U0T47m8NrpuF+fCEYgxbEwEesjSOAFgvzUlQ5GsXlM=; b=ipN6ngYry8Q5tRCB5ih9/wqYnaUsso3v8x+Gw1C/pWxEz83+oruKdugHu7sFcYpK1H AnYOV+yn18oUS3M2kH/ua3VhwmF51UtTELeKPdxJO/rShcqQ+fXG+FzPaQkyf3V9Naeb BfPtsispD6bujclnjLeK4yX+2HTDhITHbcjkfJsWaeMWz3t2TJbZuQ81AUgJs3kWVWIk IgQOqgfRRcl2jdXe8QtJjzIh22bUIcNaHdfND8pRKTcf3aIjrjYuzOo1anzYQRdWcyNt Mborhf9Wuk8R2/rjW2zVMZP69qy7GejF3ctb+hDKqMikOJwnnOI2FchdtfBFf8oaBsAC nMcA== X-Received: by 10.152.202.7 with SMTP id ke7mr1199115lac.30.1395048727596; Mon, 17 Mar 2014 02:32:07 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Mon, 17 Mar 2014 02:31:27 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> Date: Mon, 17 Mar 2014 18:31:27 +0900 X-Google-Sender-Auth: PfzgaZCY4MMU98hORtJ0K64qIGI Message-ID: To: Andrey Andreev Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1137ef8eda566904f4ca178b Subject: Re: [PHP-DEV] [RFC] Revert/extend/postpone original RFC about read_only, lazy_write sessions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1137ef8eda566904f4ca178b Content-Type: text/plain; charset=UTF-8 Hi Andrey, On Mon, Mar 17, 2014 at 6:14 PM, Andrey Andreev wrote: > See, that's where it gets tricky ... > > Is there a SessionHandlerInterface::update() method? (I assume not, > otherwise it would be enforced) > Session module handles interface a little different way. There is create_sid() method for a long time, but it's not forced to be implemented. validateSid() and update() method is the same as create_sid(). Is there a default SessionHandler::update() method? If yes, how is > that handled? That's supposedly just exposing the internal API and a > user can choose whether to override one or many methods. But if all of > them are overriden, how do you know it uses the same storage at all? > And what if an existing userland handler already has an update() > method that does something completely different? > There is dummy function for validateSid() and update(). Both returns true always. If save handler (regardless of user or C) does not implement its own update(), then update() will not be called, instead write() is called. To do that, address of the dummy function is compared. The devil is in the details and these details aren't explained > anywhere, that's why I'm concerned. > Currently implemented save handlers work as it is now both user and C. Btw, this should probably be called updateTimestamp() instead of > update(), for userland at least. write() vs. update() can be somewhat > confusing. > This could be changed. Better name is always good. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1137ef8eda566904f4ca178b--