[wp-trac] [WordPress Trac] #36455: Invalidate files in opcode cache after plug-in, theme or core update

WordPress Trac noreply at wordpress.org
Wed Jun 24 07:59:24 UTC 2020


#36455: Invalidate files in opcode cache 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):

 > Another note: Realized that some of these functions may be used for
 downgrades too, so passing true for force more might make sense.

 If I read PHP source code well, it checks if the modified timestamp is
 equal or not:
 Line 1069 ->{{{if (zend_get_file_handle_timestamp(file_handle, NULL) ==
 persistent_script->timestamp) {}}}

 https://github.com/php/php-
 src/blob/e9f295ac849aa72304eb6ca01c6289a928cc77dc/ext/opcache/ZendAccelerator.c

 So If you downgrade, the modification time of the file will change, so
 force is not required.

 Maybe a PHP developer should confirm it.

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


More information about the wp-trac mailing list