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

WordPress Trac noreply at wordpress.org
Mon Aug 7 08:37:04 UTC 2023


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

Comment (by mikeschroder):

 Replying to [comment:6 david.binda]:
 > Reviewing the r56093 , it's adding a caching to the
 `WP_REST_Blocks_Controller::get_item_schema` right above a comment which
 says: `// Do not cache this schema because all properties are derived from
 parent controller.` ( see
 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-
 api/endpoints/class-wp-rest-blocks-controller.php?rev=56093#L75 )

 Thanks for bringing this up!

 I'm also not entirely clear on the consequences, so pinging folks with
 props + comments on that particular line for feedback.

 cc: @spacedmonkey @kadamwhite @joehoyle @TimothyBlynJacobs
 @johnjamesjacoby

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


More information about the wp-trac mailing list