Compartir a través de


Key Scenarios

This section describes the most common situations developers must address when storing data in a cache. Each scenario explains the task, gives a real-world situation for the task, and includes code demonstrating how to use the Caching Application Block to complete the task.

  • Adding Items to the Cache. This topic describes the basic caching operations such as how to add an item to the cache using the Add method, setting the item's expiration policy (for the expiration process) and its priority (for the scavenging process).
  • Removing Items from the Cache. This topic describes how to remove an item from the cache using the Remove method.
  • Retrieving Items from the Cache. This topic describes how to obtain an item from the cache using the GetData method.
  • Flushing the Cache. This topic describes how to flush the cache, which empties it, using the Flush method.
  • Loading the Cache. This topic demonstrates proactive and reactive loading.