[wp-trac] [WordPress Trac] #36455: Invalidate files in opcode cache after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Thu Jun 25 07:13:37 UTC 2020
#36455: Invalidate files in opcode cache after plug-in, theme or core update
-------------------------------------------+---------------------------
Reporter: nigro.simone | Owner: mikeschroder
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.5
Component: Upgrade/Install | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing early | Focuses:
-------------------------------------------+---------------------------
Changes (by mikeschroder):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"48160" 48160]:
{{{
#!CommitTicketReference repository="" revision="48160"
Upgrade/Install: Invalidate OPcache for PHP files during updates.
When files are copied into place, check whether opcode invalidation is
available and attempt to invalidate to avoid unintended behavior or fatal
errors from themes, plugins, or core.
Introduces `wp_opcache_invalidate()` to allow safe invalidation of PHP
files from opcode cache, and a filter, `wp_opcache_invalidate_file` to
override the behavior.
Replaces the existing calls to `opcache_invalidate()` in the plugin and
theme editors to use the new function.
Thanks to jnylen0 for porting over a patch from ClassicPress that provided
much of the approach for what is being committed.
Props nigro.simone, dd32, JasWSInc, szepe.viktor, swissspidy, JanR,
asalce, Garavani, pavelevap, pputzer, GregLone, benoitchantre, jadonn,
doc987, kraftbj, Krstarica, jnylen0, nextendweb, williampatton,
ayeshrajans, joostdevalk, stevenkussmaul, boogah, jorbin, mikeschroder.
Fixes #36455, #50354.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:114>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list