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

From: Date: Mon, 25 Apr 2016 17:51:15 +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-92744@lists.php.net to get a copy of this message
This seems to mix the concerns of an opcode cache (saves opcodes) with a user-cache (saves mixed data). You should just use APCu for that. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 25 April 2016 at 19:49, S.A.N <ua.san.alex@gmail.com> wrote: > 2016-04-25 17:36 GMT+03:00 Rowan Collins <rowan.collins@gmail.com>: > > S.A.N wrote on 25/04/2016 15:09: > >> > >> In userland lacks the ability to store data in the shared memory > >> modules, do not use pecl modules, it would be very nice to have a > >> function: > >> > >> opcache_get($key); > >> opcache_set($key, $value); > >> > >> Is planned in PHP 7.1? > >> > > > > This was identified as a difference between APC and OpCache when the > latter > > was added to core several releases ago, and that's exactly why APCu > exists: > > http://php.net/apcu > > > > 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. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#92744) next »