[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Mon Jun 15 14:27:10 UTC 2020
#36455: Call opcache_reset() after plug-in, theme or core update
-------------------------------------------+---------------------------
Reporter: nigro.simone | Owner: mikeschroder
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.5
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing early | Focuses:
-------------------------------------------+---------------------------
Comment (by nextendweb):
@mikeschroder I think there is a missing () in your code. Checks for the
opcache.restrict_api should be wrapped as {{{0 && 0 || 1}}} evaluates to
true even when {{{opcache_invalidate}}} is not available.
{{{
$can_invalidate = function_exists( 'opcache_invalidate' ) && ( !ini_get(
'opcache.restrict_api' ) || stripos( __FILE__, ini_get(
'opcache.restrict_api' ) ) === 0);
}}}
Also I still do not see any reason to run {{{wp_opcache_invalidate_file}}}
filter on every file. Could you give any when you do not want to
invalidate a single file or a list of files in the opcache?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:85>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list