[wp-trac] [WordPress Trac] #14759: Improve the way oEmbed deals with caching
WordPress Trac
noreply at wordpress.org
Thu Mar 14 00:38:26 UTC 2013
#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: |
--------------------------+-----------------------------
Comment (by Viper007Bond):
Transients unfortunately probably aren't a viable solution. The problem is
that if you have a persistent object cache enabled, transients are never
written to the database, only to memcached or whatever system you have set
up. These caches come and go and will almost certainly not last 30 days
(likely much, much less). This would result in more frequent cache
fetching. This is why I chose post meta in the first place -- it is
persistent.
There's also the issue of race conditions. If a cache expires and your
site is very popular, you will easily have hundreds of users triggering
the cache repopulation before it is completed. This is why caching is dome
preemptively right now via an AJAX request (after you come back to the
edit page after saving).
Asynchronous cache repopulation is probably the solution here, i.e. WP-
Cron. It could loop through the post meta entries and regenerate any that
have expired.
Post meta isn't a great solution but it's the best one I've come up with.
:/
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14759#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list