3

Im a beginner in Merb, so want to know, what is the best practices to cache data? For example i have a page that shows list of books, that changes not really often, so im looking for a way to cache the data. There can be 2 choices: cache data from db or cache all page (html).

So, is there any tools to make simple and fast? Thanks

Dan Sosedoff
  • 2,869
  • 5
  • 28
  • 34
  • Also, i there is a page in Merb Wiki about caching plug-in called Merb-Cache - http://merbivore.com/documentation/1.0/doc/rdoc/merb-cache-1.0/index.html So, but i need some soft of real-practices examples. Still looking forward – Dan Sosedoff Jun 05 '09 at 06:48
  • Merb is kind of deprecated as it will be merged with rails very soon... you should consider learning rails instead! – Filipe Miguel Fonseca Jun 05 '09 at 11:21

2 Answers2

1

I think that the most important caching best practice is to not worry about it until you need to. Implementing caching before your server load demands it is a waste of time that you could be using to improve other areas of your codebase, add features, etc.

Sam
  • 1,014
  • 6
  • 8
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.

John F. Miller
  • 26,961
  • 10
  • 71
  • 121