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

WordPress Trac noreply at wordpress.org
Wed Jun 17 20:06:55 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):

 Replying to [comment:92 boogah]:
 > Thanks for asking for feedback on this @mikeschroder!
 >
 > As it stands, I have two concerns with the invalidating the whole cache
 being the default behavior here:
 >
 > 1. Performance on larger, high load sites. Getting rid of an entire
 warmed cache because a few files changed seems to be throwing out the baby
 with the bath water. The cache should be holding onto what it can for as
 long as is reasonable to help reduce overhead on the server.
 > 2. In some cloud hosting configurations, invalidating the entire cache
 may cause every single file on a host to reset. That's definitely not
 optimal.
 >
 > If we have the means to do per-file, I don't see why we shouldn't
 attempt to do that.

 Only that file gets invalidated which has just written into the filesystem
 and the modification time differs from the one in the opcode cache. Not
 the whole opcode cache cleared.

 Maybe we should change the summary of this and remove opcache_reset as it
 might confuse people.

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


More information about the wp-trac mailing list