exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 5 question 8 discussion

Actual exam question from Microsoft's 70-487
Question #: 8
Topic #: 5
[All 70-487 Questions]

You need to recommend a solution to meet the performance requirements for home.aspx.
What should you recommend?

  • A. ViewState
  • B. MemoryCache
  • C. OutputCache
  • D. ApplicationCache
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Scenario: When home.aspx is displayed, the rendered page must be cached for 10 minutes.

Page output caching -
The output of an action method on a controller can be cached using the [OutputCache]attribute on the method. Actions methods that return views will have the rendered page cached, while methods returning JSON data will have that data saved. A number of properties on the OutputCacheAttribute class control how data is cached.
CacheProfile- If a number of methods will have the same cache settings, it makes sense to use the web.config file to create a cache profile that can be used across all these methods.
The Duration attribute of the CacheProfile determines how long, in seconds, the output should be cached. To save an item for 10 minutes, duration would be set to
600.
[OutputCache(Duration=600)]
References:
http://failedturing.blogspot.se/2014/10/microsoft-70-486-design-caching-strategy.html

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
supersunny
Highly Voted 5 years, 6 months ago
C. Output Cache is best used in this case.
upvoted 8 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...