[wp-trac] [WordPress Trac] #59662: Clear block theme file caches when editing the theme in the Theme File Editor

WordPress Trac noreply at wordpress.org
Tue Jan 16 19:29:36 UTC 2024


#59662: Clear block theme file caches when editing the theme in the Theme File
Editor
--------------------------+--------------------------
 Reporter:  flixos90      |       Owner:  flixos90
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Themes        |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:  performance
--------------------------+--------------------------
Changes (by flixos90):

 * keywords:  needs-patch needs-unit-tests =>
 * status:  assigned => closed
 * version:  6.2 =>
 * resolution:   => invalid
 * milestone:  6.5 =>


Comment:

 Thanks @spacedmonkey, you're indeed right. I reviewed and tested this to
 verify: When editing a theme file, any cached data related to the theme
 are deleted (via `WP_Theme::cache_delete()` method).

 The only theme related cache not covered by this is the `theme_json`
 object cache group. However, as this is a non-persistent group and doesn't
 operate on a specific theme but rather applies to whatever the current
 theme is, it is neither necessary nor appropriate to clear that cache when
 editing a theme file.

 Per the above, I'll close this ticket as invalid (as it was already
 addressed before it was opened).

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


More information about the wp-trac mailing list