December 2011
Intermediate to advanced
336 pages
10h 10m
English
When data is expensive to retrieve, such as when you must access a database or call a web service method, and you might need to access the data again, you should cache the data to improve performance. Caching keeps a copy of data in memory, so that the next time your application needs it, it does not have to wait to retrieve it from disk or across the network.
The .NET Framework has three different, but similar, caches: the ASP.NET cache, the System.Runtime.Caching memory cache, and the AppFabric cache. If you might need to switch between them, you can use CacheAdapter, available at https://bitbucket.org/glav/cacheadapter.