I know it's probably not "best design" to go Cache Crazy, and cache everything under the sun. But, for a lot of things it makes sense. For data that changes often, it may not be worth it. It's possible that every time you cache something that changes often, you'll just be hitting the database again to cache the new data. I say, if you've got the memory, go for it.
Second comment. It's important to remember all the ways in which you're caching the data. For example, I'm not only caching individual rows from the database which are represented as classes, but I'm caching the collections of the rows as well. That way, when there's a search, etc, the database isn't being so stressed out. I just have to remember where (and when) I'm caching all these objects. So, when one element in the collection changes, I can refresh it.
Print | posted on Saturday, February 11, 2006 7:24 PM