3

我是 Merb 的初学者,所以想知道缓存数据的最佳实践是什么?例如,我有一个显示书籍列表的页面,它的变化并不经常,所以我正在寻找一种缓存数据的方法。有两种选择:从数据库缓存数据或缓存所有页面(html)。

那么,有没有什么工具可以简单快速的制作呢?谢谢

4

2 回答 2

1

我认为最重要的缓存最佳实践是在需要之前不要担心它。在服务器加载之前实施缓存要求这是浪费时间,您可以用来改进代码库的其他领域、添加功能等。

于 2009-06-05T17:43:59.680 回答
0

Caching is one of those things that is easier if you at least know it is going to happen and how. Even though it's not Merb my first stop would be scaling rails from RailsCasts. All of what he shows can be done in Merb as well.

I would suggest Page caching from your description if I were you.

于 2009-08-26T01:09:27.277 回答