PrepAway - Latest Free Exam Questions & Answers

Customers download videos by using HTTP clients that support various content encodings.

Customers download videos by using HTTP clients that support various content encodings.

You need to configure caching on the DownloadVideo action to maximize performance.

Which attribute should you add?



A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

A VaryByParam property with the value -VideoId-. When different values of the Id parameter are passed to the controller action, different cached versions of the Details view are generated.

It is important to understand that using the VaryByParam property results in more caching and not less. A different cached version of the Details view is created for each different version of the Id parameter.

You can set the VaryByParam property to the following values:

* = Create a different cached version whenever a form or query string parameter varies.

none = Never create different cached versions

Semicolon list of parameters = Create different cached versions whenever any of the form or query string parameters in the list varies

References:

https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing/improving-performance-with-output-caching-cs

https://msdn.microsoft.com/en-us/library/system.web.mvc.outputcacheattribute_properties(v=vs.118).aspx


Leave a Reply