Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92754 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89020 invoked from network); 25 Apr 2016 20:11:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2016 20:11:38 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.48 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 74.125.82.48 mail-wm0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:37088] helo=mail-wm0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/F3-02401-9F97E175 for ; Mon, 25 Apr 2016 16:11:37 -0400 Received: by mail-wm0-f48.google.com with SMTP id n3so145740136wmn.0 for ; Mon, 25 Apr 2016 13:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C9S6Kcay2wC8tCFb4n7qdn6mbj3VWRTUbRMG0Srxs8I=; b=icYzXjF9/DclhE7SlTjuHiW+J3TuNvTcTiFdZ//3wv/YlaWQWn6Fd16kDh5ELWzCaV FZJTLDRk9n+zSeDi5RaONyrCbPD25jlTeowC4hVDazp2INrHFMDgvUcH3L4QqTyNvc3O lfhJT+ExnoHGLSI2b28Rz+nzj4w399OsjnqLULWxk3OEUPRjqPFCRW1kzUX2XeN+aHxo Lld0M4W8Q9Dnx8SvczafPEQlnV0cgg0cjjVKqKAdzxntSjhRbQVYlXn7mdLi6zeLmBAq iuvHWWT/T7v31Ux7+dwwwKZJlqNGZVgEGo0LuwsoeLHGC89djNNNS3cdFgycIJt86YBl lQWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C9S6Kcay2wC8tCFb4n7qdn6mbj3VWRTUbRMG0Srxs8I=; b=FLZzXXvV2DrS+Cl92U2huTlGQQsEV6mjBWV2FCZ3NY95JsXveg+6pub28x/lkZio0L oV9/en6YfCEnUa24r1pf5lzIpENUGgyrdC3wtnL9nwBUHpRMwe81BqTwtcjTnaaJR7hy N+cDBkVxwf/zUr76xrLLdb8lVbSd/6qVhWngxktigco/sac6IvBjj5FJVuaOsOdOn3ma bvk6AKcTNEIHFtYuDDBS55hWumc7F5Ci86jSuNjdovJKrSZUGwdWiRt7QWWEL/bnKXt2 ngMtgJoOvjlArkQ9YueOJ+DCIxVu+nIU7pirHCDhHUeNOYYtg8eIijiX01SAjvTwmQDh 9UdA== X-Gm-Message-State: AOPr4FVT2+GQcCxpJBXbE/kDD4FOWdYNhFb4lddckn0IZ7W7tfXGwP95IjO5Gk1+N3zIqyOMMO/el43sHz1vKQ== X-Received: by 10.28.49.3 with SMTP id x3mr13748458wmx.4.1461615094400; Mon, 25 Apr 2016 13:11:34 -0700 (PDT) MIME-Version: 1.0 References: <571E2B75.6000909@gmail.com> <571E5A62.9030502@gmail.com> In-Reply-To: Date: Mon, 25 Apr 2016 20:11:24 +0000 Message-ID: To: "S.A.N" , Rowan Collins Cc: internals Content-Type: multipart/alternative; boundary=001a1142b97a800da4053154c83a Subject: Re: [PHP-DEV] Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1? From: arvids.godjuks@gmail.com (Arvids Godjuks) --001a1142b97a800da4053154c83a Content-Type: text/plain; charset=UTF-8 On Mon, 25 Apr 2016, 21: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... > A little history lesson - combining an opcode cache and data storage is one of the reasons APC died - it got too complex and too convoluted in the end. Yes, there were other reasons too, but this one was one of the big one. Getting that functionality into the core is not bad idea, but never ever ever mix it with the opcode cache. Keep them separate. > --001a1142b97a800da4053154c83a--