How to cache WordPress oembed links in the page header?

Some hosts will use a page cache for API routes to deal with this kind of problem. My initial thought would be to look at something like Cloudflare (they have some WordPress presets too) that would allow you to set up this kind of page cache for these API routes.

Interested to know how you get on as I’ve definitely seen similar issues with my site soon after sharing it on Mastodon!