开发者

Which caching approach should I use?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜