[wp-trac] [WordPress Trac] #47871: Cache item schema in REST controllers

WordPress Trac noreply at wordpress.org
Thu Aug 15 21:08:15 UTC 2019


#47871: Cache item schema in REST controllers
-------------------------------------------------+-------------------------
 Reporter:  joehoyle                             |       Owner:  kadamwhite
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  5.3
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing dev-         |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by kadamwhite):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45811" 45811]:
 {{{
 #!CommitTicketReference repository="" revision="45811"
 REST API: Cache results of get_item_schema on controller instances for
 performance.

 Caches the output of get_item_schema() to avoid redundant recomputation of
 translatable strings and other computed values. This method is called many
 times per item in each REST request, and the results of the method should
 not vary between calls.
 Additional schema fields are not cached.

 Props kadamwhite, joehoyle, TimothyBlynJacobs.
 Fixes #47871.
 }}}

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


More information about the wp-trac mailing list