[wp-trac] [WordPress Trac] #58758: Cached result for wp_theme_has_theme_json() is not invalided when theme is switched dynamically

WordPress Trac noreply at wordpress.org
Fri Jul 7 18:05:12 UTC 2023


#58758: Cached result for wp_theme_has_theme_json() is not invalided when theme is
switched dynamically
--------------------------+--------------------------
 Reporter:  westonruter   |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  6.2.3
Component:  Themes        |     Version:  6.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+--------------------------

Comment (by flixos90):

 Related: #58650

 There is some history associated with why we went with a static for
 caching, so we should make sure performance doesn't degrade with this fix.
 I like the idea of this approach as it may address the other issues too.
 At the same time, it still feels cleaner to use the cache API as it
 supports proper invalidation.

 If the added logic here doesn't cause a regression, I think it would be a
 good addition. But unrelated to that, we may want to find a better
 solution in the long term.

 cc @spacedmonkey @noisysocks @ramonopoly

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


More information about the wp-trac mailing list