My controller has this:
caches_action :render_ticker_for_channel, :expires_in => 30.seconds
In my routes file I have this:
caches_action :render_ticker_for_channel, :if => proc do !!params['doCache'] end
But for this solution to work we need to pass an extra param either through query string or post body.