A. Correct: Data caching with the appropriate timeout will enable the data needed for the reports to be stored so that the call to the database is not necessary.
B. Incorrect: Although a page output caching would be useful, the short time frame of two minutes means that the cache will likely expire before the next user requests the page.
C. Correct: A page output caching of four hours caches the output of the report for the whole morning and should eliminate the need for the report to be run a second time.
D. Correct: AppFabric caching acts much like data caching to eliminate the need for additional calls to the database to generate the reports.
Data Caching: A form of caching that can occur at the server side using the new .NET 4 Caching Framework. The default implementation uses the ObjectCache and MemoryCache objects that are within the System.Runtime.Caching assembly. When you create your cache, you can set an expiration period just as in output caching. This cache is used by all users on the server. Generally, you create a CacheProvider class that implements the ICacheProvider interface, used as an intermediate layer between the business layer and the data access layer.
Page Output Caching
[OutputCache(Duration=120, VaryByParam="Name", Location="ServerAndClient")]
Public ActionResult Index()
This code sets the response headers so the browser will know to go to its local cache for the next 120 seconds. The Duration setting represents the time, in seconds, that the page output should be cached. Due to the Location setting in the attribute, any other browser call going to this URL will also get this same server-cached output.
Web farm, or where sessions occur over many servers, each server would have to rerun the page to add it to their local cache.
Distrbuted Caching: create data on one application server and share it with the other servers
Windows Server AppFabric: Provides a set of extensions to Windows Server to enables developers to create faster, more scalable, and more manageable applications.