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

WordPress Trac noreply at wordpress.org
Sat Sep 11 13:33:03 UTC 2021


#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 has-   |     Focuses:
  dev-note                                       |
-------------------------------------------------+-------------------------

Comment (by mark-k):

 This sounds like an incomp[lete solution. Maybe I should start a new
 ticket but maybe keeping this context will be better.

 My understanding is that opcache **do not purge anything from the
 opcache** and the best you can get is mark a file as "waste" which is what
 this solution does, or reset the cache.
 The problem with marking files as "waste" is that they keep polluting the
 opcache and at some point, on servers that run a long time, you are going
 to get the opcache into full state. What happens at this point depends on
 the amount of "waste" you have, if its passes some treshold you are going
 to get an unsolicited reset, but a much worse case is that no reset
 happens and files are simply not cached any longer and the performance is
 being degraded with each new plugin/theme/core version without any
 notification to the user.

 At the very least there should be a mechanism which notifies the user that
 it is a good time to reset the opcache and give them the tools for that.

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


More information about the wp-trac mailing list