[wp-trac] [WordPress Trac] #14759: Improve the way oEmbed deals with caching

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 2 23:16:32 UTC 2010


#14759: Improve the way oEmbed deals with caching
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:                 
     Type:  enhancement   |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:  3.0.1          
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------

Comment(by Viper007Bond):

 The other issue is when embeds are used outside of posts, in the sidebar
 for example. Where do we cache to? Currently it caches sorta randomly
 (whatever `$post` happens to be set to at the time).

 Replying to [comment:6 Denis-de-Bernardy]:
 > Alternatively, WP could flush postmeta by key when we know a few that
 are invalid during upgrades. Btw, is it that much of a big deal? I haven't
 tested, but I would assume that Vimeo made sure the old oEmbed code would
 continue to work.

 We can't flush by service. The meta key is `_oembed_md5-hash-of-url-and-
 args`. On post save, `_oembed_*` are deleted for a post.

 Here's some code though that deletes all oEmbed caches:
 http://core.trac.wordpress.org/attachment/ticket/10337/10337.10.patch

 > If you need postmeta to expire, the easy approach is to an expire date
 tied to it in a separate postmeta (much like we do for transients in the
 options table: _$key_expires). Ideally, the stuff key in question gets
 detected and its parent key gets stored accordingly in memcache.

 That'd require a heavy rewrite of post meta.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14759#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list