Re: [RFC] opcache.no_cache: Opcache optimization without any caching
| From: | tyson andre | Date: | Thu, 21 May 2020 14:07:28 +0000 |
| Subject: | Re: [RFC] opcache.no_cache: Opcache optimization without any caching | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110232@lists.php.net to get a copy of this message | ||
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