Topic: Caching causes all content to disappear

So hi,

I've just started trying to implement caches_action in my application. When I upload the files to the server, though, the page stops loading before any content appears. No title tags, nothing in the HTML source, etc.

The controller looks like this:

class UserController < ApplicationController
  include ApplicationHelper
  uses_tiny_mce
  layout "admin"
  before_filter :protect, :only => [:index, :edit]
  caches_action   :index, :info, :register, :login, :edit
 
  def index
...

I've tried this on all of the controllers throughout the site, and have gotten the same result. Whenever I take out the caches_action (or caches_page, as I have also tried this), all the content loads properly. I haven't been able to find any similar experiences through various searches. Any thoughts on this?

Thanks,
Jonathan

Re: Caching causes all content to disappear

What if you delete the RAILS_ROOT/public/<cache files>?  Also monitor the logs and you should see some info about what files it is reading the cached data from.  Then after removing the cache files from public you should see info about it writing the cache file in the log.
Post relevant bits of the log too.

Re: Caching causes all content to disappear

pullmonkey wrote:

What if you delete the RAILS_ROOT/public/<cache files>?

That's what first weirded me out. Searching Google brought up the notion that all the cached files should appear in various public folders. But, when I look in the public folder on the server, I don't see anything but the images, javascripts, and stylesheets folder, along with the 400.html, 500.html, dispatch.fgi, etc. that has always been there.

pullmonkey wrote:

Also monitor the logs and you should see some info about what files it is reading the cached data from.

That weirded me out, too. I checked production.log, and nothing was mentioned that referred to caching. Nothing out of the ordinary was there at all.

cache_action :action-name

Seems to be the right code from everything I've found, and it obviously does have an effect on my application. I am using Dreamhost. Do they have weird configuration for caching, or something like that? I searched for this as well, but nothing came up.