Reading on http://guides.rubyonrails.org/caching_with_rails.html
I've got a PagesController with a home action.
The home view, displays a list of photos, videos and events. Which kind of caching is most suitable for this page?
At first glan开发者_高级运维ce, I was thinking of using a fragment cache approach for each model, since the home page displays a list of 3 models (photos, videos and events).
What are your thoughts?
Yes, a fragment cache keyed by both the model class name, and the id would be the best given your parameters.
精彩评论