Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

3. Designing the Data Access Layer > Objective 3.3: Design Data Caching

Objective 3.3: Design Data Caching

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.

Note: Working with Multiple Caches

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.

This objective covers how to:

  • Understand caching.

  • Use MemoryCache.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial