Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92747 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75550 invoked from network); 25 Apr 2016 18:27:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2016 18:27:36 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.41 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-lf0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:33352] helo=mail-lf0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/71-02401-5916E175 for ; Mon, 25 Apr 2016 14:27:34 -0400 Received: by mail-lf0-f41.google.com with SMTP id y84so24115574lfc.0 for ; Mon, 25 Apr 2016 11:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wjr1kCjpPWxLehnmaXsUmDyz7fA4XMxZ+lDJwytgxMc=; b=eJP5bVd3Clrj1GTodajWyM/mBIxs4x7a83XvZ4N/tmb+5m/V8A456gepzg8V2UuHv1 rnDtbkg/NscHG5l1FARiLuf2OkI9vlkAVNhbCD9elzOLpmnoA6jlRgoQ28OweZpoOeBt bYYdUh41TiHDyoiHJkp2cbzq+gNFmAgP+sNy59JnHgmnlZ8udX9HXJDowJO73o1z7+RY E+VuqkD5zO9LxPY8BONrx5Ue5ToIDybT8rluhuZ4XfJD2iUUUaYJ2aofW/hpFdfK66/q qFF/kVJBS0+vvL93OB7Eye5LMsdPSiphvzhhFpmcuqDycEGaYX8O+fjoxAwnk/LQJVGu gHUQ== 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:from:date :message-id:subject:to:cc; bh=wjr1kCjpPWxLehnmaXsUmDyz7fA4XMxZ+lDJwytgxMc=; b=NTOZOnAD5+7b3/+bZf47tuk0EfAwon/72gPZ2ZWzdP+vUD+jgRFI1AHBJgK9Yhnt2O IycwQ9+pKD+WX4SMwCZWwavpSeytftKHeBix3yc4SXOj6DZhYjCjZe7XVHfeQM5hzb2t Vq3le3YCnzhgrFLfwKgyBOZ/moddYUdXSatkMP8zfFMCfNSyRkpj5Zqx2JSLHfxDj500 0z9H4D3FEvDDYtKrxymYl7ahcEXfJBUhy3rx9HShEe/tMEJ7JaTxBJL/B4ZiA5SG3KtJ gpSfL0RAaWaG6advCNU27qOU5uqhlIOpkbSXa8+dK4JM8NthA0x1tomW5SmJU5dePbvB CpLA== X-Gm-Message-State: AOPr4FXg7Nl4LcsDmGSOVXiNpm6zPv2tE/8KNaqxGN9DDZggwcJvamL7iNjK3rFFHYdYugQ6AQIBZ9s2E5MuGw== X-Received: by 10.25.206.207 with SMTP id e198mr14875341lfg.97.1461608015503; Mon, 25 Apr 2016 11:13:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.126.67 with HTTP; Mon, 25 Apr 2016 11:13:15 -0700 (PDT) In-Reply-To: References: <571E2B75.6000909@gmail.com> <571E5A62.9030502@gmail.com> Date: Mon, 25 Apr 2016 20:13:15 +0200 Message-ID: To: "S.A.N" Cc: Rowan Collins , internals Content-Type: multipart/alternative; boundary=001a11412f5690a70305315322e0 Subject: Re: [PHP-DEV] Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1? From: ocramius@gmail.com (Marco Pivetta) --001a11412f5690a70305315322e0 Content-Type: text/plain; charset=UTF-8 On 25 April 2016 at 20:07, S.A.N wrote: > 2016-04-25 20:56 GMT+03:00 Rowan Collins : > > S.A.N wrote on 25/04/2016 18:49: > >>> > >>> There's not really a huge connection between opcode caching and > >>> optimization > >>> >(OpCache) and shared memory data caches (APCu, memcached, etc), so I > >>> > don't > >>> >think there's any particular logic to calling such functions > "opcache". > >>> > > >>> >So I guess the question becomes: "should APCu be made part of core?" > I'm > >>> > not > >>> >aware of anyone having proposed that, so don't know if there are > strong > >>> >feelings for or against such a thing. > >> > >> Yes, there are a lot of libraries to work with shared memory, but why > >> should they if there OPcache in core PHP? > >> Functions get, set key values will be useful and in demand. > > > > > > Because different situations call for different functionality. If the > only > > reason not to use APCu was the need to install a PECL extension, then > nobody > > would have implemented a PECL extension for Memcache, or Redis, etc. > > > > Storing data in PHP's shared memory has several downsides - for instance, > > inability to share with CLI / services built in other languages, > > non-persistent across server restarts, not shareable across instances, > etc. > > For you, these may not be an issue, but to say that "if APCu > functionality > > was in core, nobody would need any other memory cache" is somewhat naive. > > I am not against third-party libraries, I want to have this > functionality out of the box, it seems to me correct to make these > functions in OPCache, instead of adding Apcu to PHP core, IMHO... > You are still asking for a tool that does a very precise and single thing to be re-purposed into a completely different scope. Use the right tool for the right job: including APCu would be much clearer/simpler than making OpCache an all-purpose shared memory space for userland. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --001a11412f5690a70305315322e0--