Brutyn Nick wrote:
I want to cache pages...
I have this function show, and on top of my page I have the cache stuff.
But it doesnt seem to work. Cuz I saw still queries in the development log file. Can anyone help me?
I have tried caches_page and caches_action
And what about parameters like /show/1, /show/2, /show/3 =>> need to be different caches. Does anyone has any good full example?
class Frontend::ProductsController < FrontEndController
@product = Product.find(:first, :conditions => ['id = ?', params[:id]])
if @product == nil
redirect_to :action => 'list'
Caching is by default turned off in development environment,
In your config/environments/production.rb file it sets some
caching settings to true, meaning it works only in production mode
Hope this helps!