[wp-trac] [WordPress Trac] #58998: Prevent races and stampedes when flush_rewrite_rules() is called

WordPress Trac noreply at wordpress.org
Thu Aug 24 15:55:42 UTC 2023


#58998: Prevent races and stampedes when flush_rewrite_rules() is called
--------------------------------------------+--------------------------
 Reporter:  iCaleb                          |       Owner:  joemcgill
     Type:  enhancement                     |      Status:  closed
 Priority:  normal                          |   Milestone:  6.4
Component:  Rewrite Rules                   |     Version:
 Severity:  normal                          |  Resolution:  fixed
 Keywords:  has-patch needs-testing commit  |     Focuses:  performance
--------------------------------------------+--------------------------
Changes (by joemcgill):

 * owner:  (none) => joemcgill
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56448" 56448]:
 {{{
 #!CommitTicketReference repository="" revision="56448"
 Rewrite Rules: Prevent stampedes when flush_rewrite_rules() is called

 This ensures that the `rewrite_rules` option is not emptied until the new
 value has been recalculated and the option is updated. The logic for
 refreshing the option value is moved to a new private method named
 `WP_Rewrite::refresh_rewrite_rules` which is used by both the
 `flush_rules` and `refresh_rewrite_rules` methods.

 Props iCaleb, joemcgill, flixos90, mukesh27.
 Fixes #58998.
 }}}

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


More information about the wp-trac mailing list