Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73127 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88411 invoked from network); 13 Mar 2014 20:29:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2014 20:29:33 -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.45 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.213.45 mail-yh0-f45.google.com Received: from [209.85.213.45] ([209.85.213.45:56166] helo=mail-yh0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/77-47923-C2512235 for ; Thu, 13 Mar 2014 15:29:32 -0500 Received: by mail-yh0-f45.google.com with SMTP id a41so1617040yho.4 for ; Thu, 13 Mar 2014 13:29:29 -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=PQkBXSxfEvF4afDxYguUauVpO8EgVD7geQDujSjoLaE=; b=eJtB9WPWaloVqm6VWpW3QDzT7ZNNN6otjMlkl9fmFv3SxksZKmqu6Z4daIxoTtS+/c 70VWSLBAYujE8oE5Y80GWtkRtlqOc/fyrcfw+WGMCeNAvhJC5wc8Z/jP1+E0fqmROy7f BdYQGCaIprj4KAW7xTuuD5AGe0tZV7PaPtNNo= 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=PQkBXSxfEvF4afDxYguUauVpO8EgVD7geQDujSjoLaE=; b=Tt705p0cHE1Wg0DS2TJdpPE8x/tqMaMfaH+D7W/Jo9+vxx+6fRLWiADS9Mof+Ih0eK uTzUDaKfyS7AmbIW8BlZGIeaVvHG9ZiZ6Fdsl23sgZLRXhlnIWsBmZIAIqj9NKXcfZbd FAs8UDK++pyv4CAr7TFjjxlsWaIlrKGXPFheALSUDHFMVQePhAwNiznNeBVZr47P6818 GZU26HzE7vVMTf0tNwSaeeJeclZX3NYOmmv8ueMuq2CsPl+MlCVhsqklHlF7nyROoazb k+iwGJU+FmaBzYirnowOjzCkKcxoBTHYl3ZznHTiJoDyY2KhKWL+b8OWgH29RVkdkhwH ymng== X-Gm-Message-State: ALoCoQl9vYNm+TcrMCUyplmr7JOcgy/Wz9RfH55vZ6i/SbpYqEDIO8JFOfjOFxiF1Oh0bKwzt9W+ MIME-Version: 1.0 X-Received: by 10.236.156.65 with SMTP id l41mr5169452yhk.9.1394742569361; Thu, 13 Mar 2014 13:29:29 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Thu, 13 Mar 2014 13:29:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 13 Mar 2014 22:29:29 +0200 Message-ID: To: Yasuo Ohgaki Cc: Pierre Joye , Patrick Schaaf , internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Revert session_serializer_name(), session_gc() From: narf@devilix.net (Andrey Andreev) On Thu, Mar 13, 2014 at 9:32 PM, Yasuo Ohgaki wrote: > Hi Andrey, > > On Thu, Mar 13, 2014 at 7:36 PM, Andrey Andreev wrote: >> >> > The _proper_ solution, would be to keep a timestamp stored with each >> > session. kind of a last-modified timestamp. (expiry does work off last >> > modification, right?). Anyhow, the trick is to check at session_start >> > whether that timestamp plus whatever session.expire is set at, already is in >> > the past - and when that happens, destroy the one session on storage and act >> > as if it hadn't been found. >> >> Such a timestamp already exists, you can't implement sessions without >> one because there would be no way to know when a session have expired. >> For the files handler, it's filemtime() (afaik) and the behavior that >> you described is probably already in use (I see no reason not to). > > > Time stamp exists. It's correct partially. > > The time stamp is not usable for HTTP session manager to manage session > properly. We may have new API that gets time stamp of session data, but it > would require large overhead. i.e. Need additional API call to get time > stamp = additional query to session storage. The overhead cannot be ignored. > > The proper way to get and set the time stamp is "get/set time stamp" when > "store/retrieve session data". This way, there would not be overhead. User > may implement in their script, but it's a session manager task to begin > with. > >> >> >> However, that's not in the scope of GC. > > > Managing time stamp is the main task of session GC, isn't it? Yasuo, you took 2 paragraphs that belong together and put them out of context ... >> However, while Yasuo seems to always be keen on creating RFCs >> immediately, I'd rather focus on the existing ones that are session >> related: > > > You are the one who said there should be RFCs ;) > There are RFCs because I'm trying to change existing behaviors rather than > simple bug fixes. > > > Anyway, this was discussion of committed patch. It has much higher priority > than not implemented RFC, I suppose. I still think there should be GC > function. Programmers should control GC and there should be session function > for it rather than INI tweak. Exactly, focus on current tasks is what I'm saying. In the timespan of 5 hours you asked me twice if I will write the RFC _and_ wrote it without even waiting for the reply. Let's stop this nonsense now and discuss more important stuff. :) Cheers, Andrey.