[wp-trac] [WordPress Trac] #62126: Cache duplicate calls to WP_Theme_JSON::sanitize

WordPress Trac noreply at wordpress.org
Mon Oct 7 18:33:30 UTC 2024


#62126: Cache duplicate calls to WP_Theme_JSON::sanitize
-------------------------+------------------------------
 Reporter:  josephscott  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+------------------------------

Comment (by joemcgill):

 It looks like this is causing several unit tests to fail:
 https://github.com/WordPress/wordpress-
 develop/actions/runs/11220806461/job/31189817758?pr=7529

 One thing to keep in mind is that `WP_Theme_JSON` data gets sanitized at
 different times during the application lifecycle so it's possible that
 code that modifies one of the origins (e.g., registered blocks) runs after
 the first time this method is called, which could cause these caches to
 become stale.

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


More information about the wp-trac mailing list