WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 8 weeks ago

#48838 assigned enhancement

Consider "caching" embedded REST API requests

Reported by: TimothyBlynJacobs Owned by: TimothyBlynJacobs
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: REST API Keywords: has-patch has-unit-tests 2nd-opinion
Focuses: performance Cc:
PR Number:

Description

Inspired by #46249. What if the REST API "cached" embeds processed by response_to_data. This would help when embedding on collection responses with posts that share property values.

We'd use the URL as the cache key. And the caching should be safe since it'd be isolated to response_to_data and we could clear it after response_to_data completes. The requests are also all GET requests.

Attachments (1)

48838.diff (3.7 KB) - added by TimothyBlynJacobs 8 weeks ago.

Download all attachments as: .zip

Change History (2)

#1 @TimothyBlynJacobs
8 weeks ago

  • Keywords has-patch has-unit-tests 2nd-opinion added
  • Owner set to TimothyBlynJacobs
  • Status changed from new to assigned

I uploaded a first pass of what this might look like.

Note: See TracTickets for help on using tickets.