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

WordPress Trac noreply at wordpress.org
Wed Feb 26 15:41:10 UTC 2014


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

Comment (by markjaquith):

 [attachment:14759.diff] is a rough swing.

 * Gets rid of the "delete all oEmbed postmeta caches on post save" concept
 * Triggers regeneration request even for drafts
 * Cache updated only if a valid oEmbed response comes back
 * Doesn't attempt regeneration for draft re-saves if the cache is
 populated
 * Reduces the stampede possibilities noted in #17210

 I still think that the AJAX method is kind of weird. There is still some
 stampede possibility, for when you update or publish-without-
 making-a-draft an oembed URL. In that case, both front-end and back-end
 attempts could be made.

 Some thoughts:

 * Is it worth locking the regeneration for a little bit to let the AJAX
 regeneration to fire?
 * Should we look at an alternative method of firing the regeneration?
 * Should we just do a synchronous oEmbed attempt if updating a published
 post (just for new URLs)? Would slow things down, but could stop this
 "front-end requests result in HTTP requests and UPDATE queries" nonsense.
 * Could we recognize oEmbed URLs client-side in the editor and proactively
 fire AJAX cache requests before the post is even saved with that URL?
 * Should we be doing TLC transients style soft expiration, obeying the
 oEmbed cache time if it provides one and using a long cache time (a year)
 otherwise?
 * Should we have a "post transients" API?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14759#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list