Fragment caching with Radiant CMS
Tuesday, June 10th, 2008 By: Wes BangerterWe’re in the process of converting our website to Radiant CMS, and one of the new things on the site is a “Blog Blurbs” section at the bottom of every page that lists our latest blog post. Our blog is in Wordpress, so I setup the RSS Reader extension in Radiant to fetch the posts. Everything worked great, except that page loading was noticeably slower. After the page gets cached everything is fine but this is included on every page so going through the site when there were not cached pages was really frustrating. I thought about modifying the RSS Reader extension to cache our blog blurbs, but I figured a more general approach would work better, so I came up with a fragment caching extension. We’re using it like this:
<r:cache name="rss_fragment" time="60">
<r:feed:items url="[feed_url]" limit="1">
<h3><r:feed:link /></h3>
<p><r:feed:content max_length="300" no_html="true" /></p>
</r:feed:items>
</r:cache>The code is at github.

Moki Systems is seeking a full-time Ruby on Rails developer. The person should be a self starter, willing and able to figure things out on their own. Applicant should have experience with Ruby on Rails, MVC programming concepts, MySQL and/or PostgreSQL experience and the ability to learn new technologies. Any additional...