Opened 3 years ago
Last modified 3 years ago
#56440 new defect (bug)
Embed blocks in widget areas caching in many posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.0.1 |
Component: | Embeds | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
When I am using blocks for my widget areas I can include an oEmbed easily enough. For example, I might include a video in a sidebar or footer widget area using the embed Gutenberg block. This is great!
Then I notice that every single post that a user visits which displays that widget area as part of its templates will get duplicated post_meta entries caching the embed. This quickly pollutes the post_meta table with hundreds of duplicate entries for the same embed on different posts.
These "_oembed_xxx" and "_oembed_time_xxx" entries all have the same identifier for the "xxx" since they all come from the same embed in the widget area. Shouldn't these entries be associated with the widget area instead of the post?
In fact, why are these oembed cache values stored in post_meta at all? Isn't this the kind of thing that deserves more universal storage in case the same embed is used on more than one page in any circumstance?
I wonder, since these oembed cached values are designed to time out, why are we not using transients to keep the cached oembed more universally?