Re: [RFC] opcache.no_cache: Opcache optimization without any caching
| From: | Albert Casademont | Date: | Thu, 21 May 2020 14:46:51 +0000 |
| Subject: | Re: [RFC] opcache.no_cache: Opcache optimization without any caching | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110233@lists.php.net to get a copy of this message | ||
Hi tyson,
Thanks for your RFC. As ReactPHP users this is a very welcome change. Right
now we have to enable file_cache only for the optimizations, as there's no
real benefit of the full opcache in long-running CLI apps. Having this
setting would allow us to even stop using file_cache but get the opcache
optimizations. It would be even better if these optimizations moved into
PHP Core.
Thank you!
Albert
On Thu, May 21, 2020 at 4:07 PM tyson andre <tysonandre775@hotmail.com>
wrote:
> Hi internals,
>
> https://wiki.php.net/rfc/opcache.no_cache has been updated.
> Instead of opcache.no_cache=1, opcache.enable_cache=0 is now used to
> disable caching.
>
> In the RFC, I wrote that opcache_get_status() now includes the following
> new booleans
>
> -
optimizations_enabled, which is true if any optimization
> passes will
> get run.
> - allow_cache, which will be true if any form of opcode caching
> is
> enabled.
> Maybe cache_opcodes or
> opcode_cache_enabled would be a better name.
>
> Any thoughts on whether opcache_get_status() should be changed at all here?
> It's probably possible but inconvenient to determine what's being done
> with extension_loaded() and multiple calls to ini_get(),
> and the intended meaning of existing flags such as
> opcache_enabled was
> never documented
> in https://www.php.net/opcache_get_status
>
> Any other thoughts on the RFC?
>
> > > In my opinion, configuration names should never be "in the negative".
> > > Instead of defaulting to opcache.no_cache=0, default to
> opcache.cache=1.
> >
> > ... the setting isn't actually enabling cache, it's allowing cache (i.e.
> opposite of disabling),
> > so making this "opcache.allow_cache" might be the best. I'll probably go
> with that.
> > (similar to allow_url_fopen, allow_url_include)
> >
> > ... opcache.cache could be confused with the caching
> > strategy or the
> path to the cache,
> > or being sufficient on its own to enable caching
>
> Thanks,
> - Tyson
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>