Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73071 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3854 invoked from network); 12 Mar 2014 00:19:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2014 00:19:59 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:35127] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/72-22021-D28AF135 for ; Tue, 11 Mar 2014 19:19:58 -0500 Received: by mail-lb0-f170.google.com with SMTP id s7so6145087lbd.15 for ; Tue, 11 Mar 2014 17:19:54 -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=iuG4Zw8ZQrE7+nZAhIsK6/5whqWV2rAwh4jMAMnpa+A=; b=TTTq6opmgYGtRVspjycdeHX3rUJjomtgoLt01APOT038oa5HIBPVJ+/bp0j99F33Ja TMifS+LY3KsXxP7RqcSqJHsoljuxwFxIO3gUapwSYi/UEM2UrNIpOsTlDMhpNbeCom97 6k0Q5qiaGVcLB4lUBbbOS3QVI0PS0uWHJt0gKP/E1geGoLYwe8qC2iTb5Qx/ei/K+Rox 2jVWWc+vujtZSGPhHXYIwIU0LoW0pxI9NHHoiLepNwCOjE0nxkmBTd41F4UAOcg4cuR0 NSLo/V+nzBdg0X8/dpXemNfVpTalDlciSVRNhD4AFkJsTHnhpebnpu/qedjUu/KCDirT pYOg== X-Received: by 10.112.94.229 with SMTP id df5mr7483060lbb.36.1394583594533; Tue, 11 Mar 2014 17:19:54 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Tue, 11 Mar 2014 17:19:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 12 Mar 2014 09:19:14 +0900 X-Google-Sender-Auth: v4fYjZR_WX5hPgy8T86vuG-HERA Message-ID: To: Andrey Andreev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1135f7acc30ab804f45dcba2 Subject: Re: Revert session_serializer_name(), session_gc() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1135f7acc30ab804f45dcba2 Content-Type: text/plain; charset=UTF-8 Hi Andrey, On Wed, Mar 12, 2014 at 8:54 AM, Andrey Andreev wrote: > > Users want to have contorl *when* gc is performed rather than luck. This > is > > reasonable. IMO. > > I like control, it's nice and *I already have it*: > > ini_set('session.gc_probability', 1); > ini_set('session.gc_divisor', 1); Of course you can. It does not look nice as API. API should have good name for it. IMO. session_gc() is useful for both low traffic site and high traffic site. I don't see reason not to have explicit gc API. User may simply call session_gc(); periodically by cron, etc. > >> > >> And while session_serializer_name() is just redundant, session_gc() > >> could cause performance issues. > > > > There is session_module_name(), why not session_serializer_name()? > > Why not session_cookie_lifetime()? > Why not session_cache_limiter()? > Why not session_entropy_file()? > etc. Those aren't changed by programs often. As I wrote, 3rd party save handler implements their own serializers. Not like above example, it is likely called with session_module_name(). e.g. session_module_name('memcache'); session_serializer_name('igbinary'); It looks better than session_module_name('memcached'); ini_set('session.serializer_handler', 'igbinary'); It's reasonable to have session_serializer_name(), since it would be used with session_module_name(). API should have good name here, too. We may discuss what we should do with module functions that modify it's INI. There are number of them already. I think you need RFC for this. My opinion is "There should be API with obvious name, if it is used often or mandatory". Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1135f7acc30ab804f45dcba2--