70-486 Skills Measured
>>1. Design Application Architecture (20%-25%)
Design Caching Strategy
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.
Donut caching is a server-side technology that caches an entire page other than the pieces of dynamic content—the donut holes.Although ASP.NET Web Forms supports donut caching through the Substitution control, the Razor Engine does not offer support for donut caching. However, because ASP.NET MVC 4 is built on top of ASP.NET, you can still use the Substitution APIs through the HttpResponse.WriteSubstitution method by creating an MVC helper.
Donut hole caching
Caches only select portions of the page while keeping the rest of the page dynamic. Donut hole caching is supported by creating the partial view that will be cached.
public ActionResult ProductsChildAction()
ViewBag.Products = Model.GetProducts();
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.
web cache (or HTTP cache) is for the temporary storage (caching) of web documents on the client side. HTTP Caching can be implementing using HTML code such as pragma and HTTP Header Expires parameter.
With HTML5, the entire application can be taken offline by using application caching.
Implementing Application Caching
Using the keyword manifest:
Sample Question 69 | Sample Question 70 | Sample Question 71 | Exam Question 141