Fragment Caching And oEmbed Discussion
Really great episode, I will be implementing something similar soon. While watching I had a question: Could the first-time-slow-page be avoided by making a rake task to visit all video pages using something like httparty, watir, mechanize, or something similar? We have a little over 200 videos on our site, so this would be nice to avoid the delay every day/week/whatever we set the cache length.
You could remove the expires_in option and set up a nightly cron job to expire the fragments and then immediately request the page instead. When you do it with an expiration like this, you can't know when it expires exactly so it would be hard to expire and then request the page again.