Re: Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1?

From: Date: Mon, 25 Apr 2016 17:56:50 +0000
Subject: Re: Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-92745@lists.php.net to get a copy of this message
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. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#92745) next »