[wp-trac] [WordPress Trac] #58657: Add in missing caching to `get_item_schema` method to new endpoint

WordPress Trac noreply at wordpress.org
Thu Aug 24 20:21:50 UTC 2023


#58657: Add in missing caching to `get_item_schema` method to new endpoint
--------------------------+---------------------------
 Reporter:  spacedmonkey  |       Owner:  spacedmonkey
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.3
Component:  REST API      |     Version:  5.0
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:  performance
--------------------------+---------------------------

Comment (by kadamwhite):

 In [changeset:"56459" 56459]:
 {{{
 #!CommitTicketReference repository="" revision="56459"
 REST API: Remove misleading comment in
 WP_REST_Blocks_Controller->get_item_schema.

 In r56093 schema caching was added above a comment instructing developers
 not to cache that controller's schema. However, there is no obvious
 penalty for re-caching schema that is partially derived from a parent.

 Caching schema in the same way in every controller is beneficial
 consistency, and discussion at WCUS2023 contributor day concluded we could
 remove this comment.

 Props ahardyjpl, davidbinda, johnjamesjacoby, TimothyBlynJacobs.

 Fixes #59193. See #58657.
 }}}

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


More information about the wp-trac mailing list