MVC Developer Question:

Download Job Interview Questions and Answers PDF

Tell us what is Output Caching in MVC?

MVC Developer Interview Question
MVC Developer Interview Question

Answer:

The main purpose of using Output Caching is to dramatically improve the performance of an ASP.NET MVC Application. It enables us to cache the content returned by any controller method so that the same content does not need to be generated each time the same controller method is invoked. Output Caching has huge advantages, such as it reduces server round trips, reduces database server round trips, reduces network traffic etc.

OutputCache label has a "Location" attribute and it is fully controllable. Its default value is "Any", however there are the following locations available; as of now, we can use any one.

☛ Any
☛ Client
☛ Downstream
☛ Server
☛ None
☛ ServerAndClient

Download MVC Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is the difference between View and Partial View?Please explain what does Model, View and Controller represent in an MVC application?