开发者

Which caching approach should I use?

开发者 https://www.devze.com 2023-02-27 10:04 出处:网络
Reading on http://guides.rubyonrails.org/caching_with_rails.html I\'ve got a PagesController with a home action.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消