Rails page caching is without a doubt the best way to speed up your application and reduce the server load. I decided to cache some XML I was dumping out for a web service and realized that Rails will cache the document as HTML. As long as the controller handles nothing but xml you can do the following as a work-around:
class LinkApiController < ApplicationController
session :off
skip_before_filter :check_authorization
LinkApiController.page_cache_extension = '.xml'
caches_page :get_stuff
...
end





Post a Comment