Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92746 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73477 invoked from network); 25 Apr 2016 18:07:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2016 18:07:12 -0000 Authentication-Results: pb1.pair.com header.from=ua.san.alex@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ua.san.alex@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.194 as permitted sender) X-PHP-List-Original-Sender: ua.san.alex@gmail.com X-Host-Fingerprint: 209.85.213.194 mail-ig0-f194.google.com Received: from [209.85.213.194] ([209.85.213.194:33535] helo=mail-ig0-f194.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/21-02401-ECC5E175 for ; Mon, 25 Apr 2016 14:07:11 -0400 Received: by mail-ig0-f194.google.com with SMTP id g8so11964648igr.0 for ; Mon, 25 Apr 2016 11:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=oVoyImOCyl692f3f0fvoQW50VAaNJJWp0uQfT8+SoVo=; b=c8JkxQbHjCzBQDZoSiOxgN1EJtFqbBQCevpPl6NE984GKYCzvWryTxiSwBHyMm1m76 wwKjgukFAKd1yo6+iOPCJ9Zlr7Lkg1OVYl9TZD7TxQaX+YlIP4YE7kYwHLpuj1wT8NMf C2enqRx6UeumJxDn+WaGfYRwzJjUOuFNpRjolxSiaNSODRf4qTdbunnTaV1tPmDSGo2i itHF9ooQxKe5Yi7zX8kllz1Zj8rpmFDm8XNkDHu++zfk33vnM78wbZ3y/D3MxvBx55rb 5iE4h2DbHBta7bIIHWmB1XVN7RZwAnoIfXfpteTI05lJAdXMUsne4MWKYuCSbiEqNoXk zORA== 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; bh=oVoyImOCyl692f3f0fvoQW50VAaNJJWp0uQfT8+SoVo=; b=OE9eodaz8RLQPKxanqe0J3GR2tnab0ihyrE5ne5I1IzLpr5GvhRZMpAOeSurVcne7B wfZEqnMJ91VSR1UvaES17i4U2nKtmMjypMYS99hGOpF5TueqwZ/fW3edO/tDWLKHJY0W 06efYovQx3pn10XlXdWJQExaYYghDr9nSRyPsgvD5flg6xFsAdRFjScmNNtYKs1m866S 2/luKIteaznbYYHwOd0ete51XiBou+aoHmaz3YcGu7+hxyaIsz1JJj6quxp2OpBZhAE2 L4i39NA5RLDw2bTew/mB3WsbiykED+EphTvTVHGHsEpvoR5qKHtMT+hGUGPpapVmOq+D Gu/w== X-Gm-Message-State: AOPr4FX35UaBkV8Zjgnj3raIZFLko4BiPoXuuT9aClKvGMay/H4scaoxPFOIeCeRTgUeP8OIajhMuCWAbS+IVw== MIME-Version: 1.0 X-Received: by 10.50.129.69 with SMTP id nu5mr13867757igb.45.1461607626987; Mon, 25 Apr 2016 11:07:06 -0700 (PDT) Received: by 10.50.54.201 with HTTP; Mon, 25 Apr 2016 11:07:06 -0700 (PDT) In-Reply-To: <571E5A62.9030502@gmail.com> References: <571E2B75.6000909@gmail.com> <571E5A62.9030502@gmail.com> Date: Mon, 25 Apr 2016 21:07:06 +0300 Message-ID: To: Rowan Collins Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1? From: ua.san.alex@gmail.com ("S.A.N") 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...