I have a layout page that makes a few DB calls. This stays the same for a few days, its only the base content that is dynamic. How can I cache the layout page?
caching?
- Wheels
- Posts: 0
- Starts: 5
- Wiki Edits: 0
I realize that memcache is not allowed on shared servers. What alternatives do we have?
I have a layout page that makes a few DB calls. This stays the same for a few days, its only the base content that is dynamic. How can I cache the layout page?
I have a layout page that makes a few DB calls. This stays the same for a few days, its only the base content that is dynamic. How can I cache the layout page?
- William
- Posts: 1061
- Starts: 32
- Wiki Edits: 56
Take a look at
http://ap.rubyonrails.com/classes/ActionController/Caching/Pages.html
you can just cache the page for a few days (which places a static file in your public/ folder), then expire_page whenever it is updated.
http://ap.rubyonrails.com/classes/ActionController/Caching/Pages.html
you can just cache the page for a few days (which places a static file in your public/ folder), then expire_page whenever it is updated.
2007-09-06 07:52 AM
- Koloa
- Posts: 21
- Starts: 15
- Wiki Edits: 0
- Location: south jersey
hi,
i am trying to expire_page but am getting this
NoMethodError (undefined method `merge' for "../config/../public/index":String):
i am calling it like
expire_page("#{RAILS_ROOT}/public/index")
i am trying to expire_page but am getting this
NoMethodError (undefined method `merge' for "../config/../public/index":String):
i am calling it like
expire_page("#{RAILS_ROOT}/public/index")
2008-08-09 11:41 PM
nj rails grunt!- William
- Posts: 1061
- Starts: 32
- Wiki Edits: 56
do you have the proper plugin installed? will_paginate or classic_pagination? You'll need to get the applicable one installed (assuming you're on rails 2.x) and restart your app.