Page caching and content types for feeds

Posted by Mike Mangino on May 23, 2007

This isn't beautiful, or particularly elegant, but if you only need to cache a few rss feeds, it's amazingly easy. Inside your apache virtual host configuration, simply add:

  <Location /item/rss>
    ForceType application/rss+xml
  </Location>

The argument in the Location tag should be the full path to your cached item (without the html). You can set any content type. This gives you all of the benefits of page caching while still sending the correct content type.