I've introduced you to Output caching and Fragment caching in my last article. By means of both we are able to increase the performance of our web applications significantly by storing and retrieving commonly accessed pages and fragments of pages in memory. This article will explain the use of the third and most granular cache method, Data Caching. I will show you how to cache at the object level. Translation: more flexibility, more speed. Therefore, happier users, and not to mention (cough cough), more ca-ching.
How Caching Means More Ca-ching, Part 2 (Page 1 of 4 )
My first article on caching showed you the benefit of properly implementing caching in your ASP.NET applications. But beyond that I also showed you how and when to use Output caching and Fragment caching. As you've no doubt gleaned already, different forms of caching are appropriate for different situations you meet. Just keep that in mind, because as I explain the use of data caching you may realize just how superior it is, and feel a strange need to employ it at every opportunity. Just remember that Fragment and Output caching are the best choices in the situations I presented in the last article, and they remain that. That said, let's see what data caching is, and where to use it.
Basically, data caching is the engine that provides for the storage and retrieval from memory at object level. This means that individual objects, (which includes... well, everything in .NET) can be cached and shared throughout multiple requests and sessions. In this article I will show you three methods of utilizing the data cache.