Caching oembed twice?
-
While debugging a plugin issue with a developer, I noticed that WordPress seems to cache oembed values twice. I’m not sure if I have a problem, or if this is not default behaviour?
When I post a video in a post, WP is adding an oembed_cache postmeta value in the table for the original post ID.
But it is also creating another entry in the table with post-type: oembed-cache. As a new post type entry, it has a new ID.
The cached data in the post type and the post meta appears to be the same, so what is the point of this? Is it normal?
A bit of reading through old threads seems to show me that the post meta way has been around for some time. Then I read through a conversation on github where they discussed adding it as a post type for certain situations. But it wasn’t clear how this was done.
It just seems weird to me that I now have the same data cached in two different paces in the database.
Anyone have any deeper knowledge on this topic?
-
This topic was modified 4 years, 11 months ago by
whistlerdan.
-
This topic was modified 4 years, 11 months ago by
whistlerdan.
-
This topic was modified 4 years, 11 months ago by
-
While debugging a plugin issue with a developer, I noticed that WordPress seems to cache oembed values twice. I’m not sure if I have a problem, or if this is not default behaviour?
I recommend asking at that plugin’s support so the plugin’s developers and support community can help you with this.
You misunderstand me. This has nothing to do with the plugin. It just so happened that while I was doing that, I went into PHPMyAdmin and that’s when I discovered the Oembed caching in two places.
It is not specific to the plugin.
You misunderstand me.
My apology 🙂
On a clean WordPress install, I pasted in a YouTube link to create an embed. Here’s what appeared in the database. It doesn’t match what you’re describing, so I’d suspect a plugin.
wp_postmeta: https://i.imgur.com/KH1WPXJ.png
wp_posts: https://i.imgur.com/JCNzmJX.png-
This reply was modified 4 years, 11 months ago by
rickymccallum87. Reason: Correct the labels for the images
Very helpful, thanks!
-
This reply was modified 4 years, 11 months ago by
The topic ‘Caching oembed twice?’ is closed to new replies.