How to cache the whole rhtml file?

For this you are more likley talking about caches_page and caches_action. Should be faster than partial caching. Plus remember that caching is only active in production mode.

http://api.rubyonrails.org/classes/ActionController/Caching/Pages.html http://api.rubyonrails.org/classes/ActionController/Caching/Actions.html

But I have to ask. If you have fixed content. Why are you storing it in DB?