Open lucalooz opened 6 years ago
Not sure if this is related, but we did get another report of this in the forums, but with an up to 20 second delay. I was not able to replicate this issue on a test site.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Related: #11063
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
We are seeing a slow down of 400ms when we enable Jetpack on posts that contains an Instagram url.
This seems to be caused by the Jetpack automatic embed for Instagram https://github.com/Automattic/jetpack/blob/e4477ebb9e13752a04776421351b7809039baf10/modules/shortcodes/instagram.php#L65 It does an http request to the
oembed
Instagram api and uses the WP Object Cache to cache the results. However by default the WP Object Cache is valid only for the executing request unless you add a persistent storage (apcu, memcached, redis etc).The default WP Core oembed implementation uses the database postmeta to cache oembed results and this issue doesn't happen. https://github.com/WordPress/WordPress/blob/5d1e06f93925e23ddec79e643d4ce4c963d46f14/wp-includes/class-wp-embed.php#L276
Is there a specific reason for which Jetpack replaces the default oembed core implementation? Why the Jetpack implementation uses WP Object Cache and not postmeta like wp core for caching?