[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Tue Jun 16 09:58:17 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 ayeshrajans):
Quoting from the slack channel on my own reply:
Looking at the patch (12.2)... Do we absolutely need to run the hook on
every file? Ideally, I think we can run the hook once to get boolean
whether we need to clear opcache or not, and cache that result. I highly
doubt per-file opcache clear feature is necessary, and if that is the
case, there are post-update hooks that plugins can selectively clear
caches of.
Patch in 11 is doing the hook-once-then-cache approach. I think more
verbosely commented function in 12.2 is much better, save for the concern
of running the hook for every file.
We can also return-early if the static $can_invalidate is false before
running the preg_match call.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:90>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list