[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update

WordPress Trac noreply at wordpress.org
Fri May 15 06:35:40 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):

 I proprose 36455.7.diff:
 - the filter in the previous patch is not necessary in my opinion. I do
 not see any kind of usage of that as if a plugin/theme/wordpress gets
 updated, just other plugins/themes/(previous wp version) could exclude any
 file.
 - Optimized {{{function_exists( 'opcache_invalidate' )}}} call to run only
 once per install
 - Added {{{.phtml}}} file extension as it is very popular. Consideration:
 These are valid file extensions for PHP, but I think they are very rare:
 {{{.php3 .php4 .php5}}}

 BTW: I'm thinking about that maybe it would be better to call
 {{{opcache_invalidate()}}} on the deleted PHP files also before the
 deletion. Maybe that would be a more safe way of clearing the opcache.

 Also I think none of these steps solve the issue when the user just
 uploads(ssh,ftp,sftp) the update/plugin/theme directly and in that case
 the site still can crash because the invalid cache state.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list