Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83144 invoked from network); 17 Mar 2014 09:14:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 09:14:44 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.213.51 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.51 mail-yh0-f51.google.com Received: from [209.85.213.51] ([209.85.213.51:40275] helo=mail-yh0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/00-17561-30DB6235 for ; Mon, 17 Mar 2014 04:14:44 -0500 Received: by mail-yh0-f51.google.com with SMTP id f10so4925962yha.38 for ; Mon, 17 Mar 2014 02:14:41 -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=8/tiW1LOIYk5iB3tsSI5sEY6JOX57PyYYKVee9NOTYk=; b=JFgm8JDA4zjKLq6lqTDpU33ZIf6AowyF67wIA0tQi8NVYtnhs3kgfDUPjGsQU6Pq1C SZS/tP4oy57q387AfSQcUF22qwkhBB6ZaA18ilME7C/Ib+V95c8YeLE5GM5CFbjmX1bh sW5NHNl+/JO+CnyKfUdxx+3xM8XzY22BWu43o= 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=8/tiW1LOIYk5iB3tsSI5sEY6JOX57PyYYKVee9NOTYk=; b=YOidsRQ/+Jw1a8RmFPnXlBGeAS31dumFhWbWukkiM2BoCNuFXsSi3c9BhFnD5J0eQf 043VU+XegM/yZslVAVqEczANLH2Q/ykEmGyTrnwqZgQ3O4jTnxr3tcX9ScxU4xKxw7rB 06vtfnoVi3237RQfgBjL7lATZk0hGSHYHNz++y5TcUihOlY2Sj//HpIbsAe9FDCYbkHz tpmIjg+JJalhwpNTUo0UfMLzqznj/YD+/UCUf7w0EUab0sDe8mH0bxl116PAxete/1Hk BaEkNME1H3mc8TU5nHo9UUDqKLSnPGClf3BI8VvpHP/cEvpAiEuQXoB81WivcEu3+N6t 6Htg== X-Gm-Message-State: ALoCoQlg3AmizHjSrgTHRA8QkFAxRa7YJAATsFM0oah2ZkKCYoB88ttdw0m9n++ecAyo9kAQXNaq MIME-Version: 1.0 X-Received: by 10.236.172.33 with SMTP id s21mr32699945yhl.71.1395047681605; Mon, 17 Mar 2014 02:14:41 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Mon, 17 Mar 2014 02:14:41 -0700 (PDT) In-Reply-To: References: <5324FE40.1070704@sugarcrm.com> <532603A0.8060802@sugarcrm.com> Date: Mon, 17 Mar 2014 11:14:41 +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:02 AM, Yasuo Ohgaki wrote: > Hi Andrey, > > On Mon, Mar 17, 2014 at 5:52 PM, Andrey Andreev wrote: >> >> > It updates time stamp always. >> > >> > It does >> > >> > "write data if data is updated" >> > or >> > "write data if save handler does not have update API" >> > or >> > "update time stamp if it is needed" (e.g. memcache does not need to >> > update >> > time stamp since it updates time stamp by read. It's save handler >> > implementation choice what to do with update API) >> > >> > For save handlers like memcahe/memcached, session module is writing back >> > the >> > same data just to waste resources when session data hasn't changed. >> >> And what about userland session handlers? > > > It's the same as C written module. Unless there is update() method, session > module > writes session data always. See, that's where it gets tricky ... Is there a SessionHandlerInterface::update() method? (I assume not, otherwise it would be enforced) 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? The devil is in the details and these details aren't explained anywhere, that's why I'm concerned. Btw, this should probably be called updateTimestamp() instead of update(), for userland at least. write() vs. update() can be somewhat confusing. Cheers, Andrey.