Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87093 invoked from network); 17 Mar 2014 09:58:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 09:58:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.160.171 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.160.171 mail-yk0-f171.google.com Received: from [209.85.160.171] ([209.85.160.171:51026] helo=mail-yk0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/C0-17561-527C6235 for ; Mon, 17 Mar 2014 04:58:02 -0500 Received: by mail-yk0-f171.google.com with SMTP id q9so14361931ykb.2 for ; Mon, 17 Mar 2014 02:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2MmN0/cDbLinI/I5zMlmDVjC+OKh1lMbg//CAq7kVNQ=; b=o8IbeYVCqzBnsPG6mNykYBB8NQEE+Rgp5dwDcV/O8OhWP2VSjK63Fk6PIYZotQA3NJ jDCF5Y87PEprrFu9XWaNOXxhP5Z6QR2FsPRBAL8AJ8Oss4f9kQjMO48DjUMK+QtnHpSy Juq7tORY24Hn+x/ql9f/txw4s6byeTpiXbCuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2MmN0/cDbLinI/I5zMlmDVjC+OKh1lMbg//CAq7kVNQ=; b=fSfWEtZJ9zlQGBNVClO29Jd1v81f8aTd94Ia/t4ZQDNTf4MeHr3HnvC984CL4JDRzT ShjjXwmtIxJLXIRcgdo3U88DgIyU6nWSfW6vg/EnkfXo7M3asWEBQFNwbVY9ItEjuu25 7C51SVE/Wl1LyFIRjW21KDhxFHJ++TCpildbHxnUM4UomMorlYjMLJvYLWvsGln/2PAu rsx3IX/bWXRnsSCH4SboSLManqQ9DYPVhXFXFazkhrDY7k9AX+wUQKiwwtvW78joJmEA kbrE69zGEe7iKeuvzEJputgGtLOrMt2/xr8f1HMNC1fJsLYAzbXqThE8JBgsRZrNUf0m 9ipA== X-Gm-Message-State: ALoCoQmnQ2FRxH5qVlLSREOE2bqvRvrw8UwDuw0hr6uh3Ypx+avj/Qupi1N8QmPknVaqy9BR9g7t MIME-Version: 1.0 X-Received: by 10.236.172.33 with SMTP id s21mr32896600yhl.71.1395050274604; Mon, 17 Mar 2014 02:57:54 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Mon, 17 Mar 2014 02:57:54 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> Date: Mon, 17 Mar 2014 11:57:54 +0200 Message-ID: To: Yasuo Ohgaki Cc: Stas Malyshev , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Revert/extend/postpone original RFC about read_only, lazy_write sessions From: narf@devilix.net (Andrey Andreev) Hi, On Mon, Mar 17, 2014 at 11:31 AM, Yasuo Ohgaki wrote: > 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(). I believe I already replied to this previously ... *sid() is passed to the other functions, so that's not really relevant. But ok, I get the idea. >> 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. Ok, so why is 'lazy_write' an option at all then? I don't see a reason why it shouldn't be the default and even mandatory behavior. >> 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. Well, there you go - updateTimestamp() is a better name. ;) Cheers, Andrey.