Rails caching problem?

I have a rails blogging application that works well. However, I did some experimenting with caching and, despite returning to the previous version, is still not the case here.

It seems that all the pages are in the cache or something like that (I have already cleared the browser cache), since the server logs do not show any access to the database.

Is there any clue on how to solve this? Thank!

+3
source share
1 answer

Probably the problem is that you used page caching as follows:

class ProductsController
  caches_page :index
  def index
    @products = Product.all
  end
end

products.html / , , Rails, . , . .

, , :

class ProductsController
  def clear
    expire_page :action => :index
  end
end

- .html (bash):

rm public/products.html

. , .

P.S: , memcached cahce :

Rails.cache.clear
+6

All Articles