exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 83 discussion

Actual exam question from Microsoft's 70-486
Question #: 83
Topic #: 1
[All 70-486 Questions]

You are developing an ASP.NET MVC application that delivers real-time game results to sports fans. The application includes the following code. Line numbers are included for reference only.

The source data for the game results is updated every 30 seconds.
Testers report the following issues with the application:
✑ They report seeing other user's name when they sign in to the application.
✑ They report delays in seeing the latest game results.
You need to correct the performance issues.
Which two changes should you make to the code? Each correct answer presents part of the solution.

  • A. Replace the code at line 07 with the following codesegment:[OutputCache(Duration = 30, VaryByParam = "none", Location = OutputCacheLocation.Client, NoStore = true)]
  • B. Replace the code at line 12 with the following code segment:[OutputCache(Duration = 30, VaryByParam = "none", Location = OutputCacheLocation.Server, NoStore = true)]
  • C. Replace the code at line 07 with the following code segment:[OutputCache(Duration = 3600, VaryByParam = "none", Location = OutputCacheLocation.Server, NoStore = false)]
  • D. Replace the code at line 12 with the following code segment:[OutputCache(Duration = 3600, VaryByParam = "none", Location = OutputCacheLocation.Client, NoStore = true)]
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️
B: They report delays in seeing the latest game results. This is the output of the GetResults() function. We decrease the Duration in the cache for this function from 3600 to 30. This is one line 12.
A: They report seeing other user's name when they sign in to the application. This is the output of the GetUserInfo() function. We should change the
OutputCacheLocation ofthe caching of this function from Server to Client. This is on line 7.
Note: The OutputCacheLocation.Client option indicates that the content should be cached at the requesting client. Any requests for the same resource made from the same client within the expiry period, will be served out the client's cache, without a network request being made to the server.
The OutputCacheLocation.Server option indicates that the content will be cached at the origin server. This content will be served for subsequent requests made by the initial client and any other client requesting the same resource within the expiry period.
References:
https://growlycode.wordpress.com/2014/01/10/mvc4-outputcache-location-basics/

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
hungry_ape9000
Highly Voted 5 years ago
FINAL ANSWER: A & B Basically the 2 answers where it is 30 seconds, not 3600 seconds which is an hour.
upvoted 6 times
mr_
4 years, 12 months ago
Good point. I agree.
upvoted 1 times
...
...
daniel_lobo
Most Recent 5 years, 6 months ago
It cannot be B if one of the complaints is seeing other users data. If you cache on the server side that is what will happen.
upvoted 1 times
Aerologic
5 years, 6 months ago
B is for the results, not the user information, so this should be stored on a server level.
upvoted 6 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 ...