[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update
WordPress Trac
noreply at wordpress.org
Sun Jan 8 19:19:28 UTC 2017
#36455: Call opcache_reset() after plug-in, theme or core update
-------------------------------------------------+------------------
Reporter: nigro.simone | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch needs-testing | Focuses:
-------------------------------------------------+------------------
Comment (by asalce):
The closest filter I found was 'upgrader_pre_download' which fires a few
steps before the files are extracted from the zip file. I attached
'36455.3.diff' with the proper use of the filter (ignore patch 2).
I also added some checks in the filter so:
1. It only clears files within Wordpress' base dir
2. Trigger only when validate_timestamps is not active
@JanR if we are invalidating each file, do we still need to call
opcache_reset?
@dd32 brings up a good point about the external plugin updates. I am not
sure there is much that can be done here, these tools should be made aware
to call wp_opcache_reset manually. There is also the case when updates are
ran via the filesystem (FTP for instance), which will completely by-pass
all of Wordpress/PHP. My best guess is that certain hosts whom have
validate_timestamps deactivated should take extra precaution when
deploying to production, probably part of their building procedures.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list