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

WordPress Trac noreply at wordpress.org
Wed Jun 10 08:36:35 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):

 @ayeshrajans we just released an update to our plugin, had around 100k
 updates in 2 weeks. Our support staff had around 10 tickets related to the
 opcache (disabled validate_timestamps or huge revalidate_freq). Also there
 might be others who experienced this problem, but they were able to solve
 it on their own. So it is not so common, but I'm sure it happened a lot of
 people in the past and they are just getting some random PHP error which
 do not give any hint how to solve it.

 Personally I would remove this part from your code to make sure that it is
 cleared all the time. I think when opcache_invalidate function is
 available we should call it, as it does what its need to be done now or
 later.
 {{{
 ( ! ini_get( 'opcache.validate_timestamps' ) || ini_get(
 'opcache.revalidate_freq' ) === "0" )
 }}}

 Otherwise, I like your changes.

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


More information about the wp-trac mailing list