exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 1 question 49 discussion

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

HOTSPOT -
You are updating an existing multitenant ASP.NET MVC application for medical clinics. The application aggressively uses output caching to improve performance by caching content for 36 hours. The application uses a query string parameter named "clinicID" that contains the clinic that the user is currently viewing.
Users report that they are occasionally seeing data for the wrong clinic. Users also report that the application seems to take a long time to return data for a specific clinic even if they have viewed it recently.
You need to configure web.config to resolve the reported problems.
You have the following markup:

Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (To answer, select the correct markup segment from each drop-down list in the answer area.)
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Target 1: noStore="false"
The page that has the OutputCacheProfile.NoStore property set to true issues a response specifying in its header to prevent secondary storage of sensitive information.
Target 2: VaryByParam ="clinicID"
The VaryByParam is a semicolon-delimited set of parameters used to vary the cached output. It allows varying the cached output by GET query string or form
POST parameters. For instance, you can vary the user-control output to the cache by specifying the user-control name along with either a query string or a form
POST parameter.
Incorrect: Not varyByControl="ClinicID"
The VaryByControl is a semicolon-delimited set of IDs of controls to be cached.
Target 3: duration=129600"
The Duration represents the time in seconds that the page or user control is cached. Setting this property establishes an expiration policy for HTTP responses from the page or control to which it applies and will automatically cause the caching of their output.
129600 seconds is 36 hours (60*60*36).
References:
https://msdn.microsoft.com/en-us/library/system.web.configuration.outputcacheprofile(v=vs.110).aspx

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
MaverickCalibre
Highly Voted 5 years, 5 months ago
noStore = true; The page that has the OutputCacheProfile.NoStore property set to true issues a response specifying in its header to prevent secondary storage of sensitive information. https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.outputcacheprofile.nostore?view=netframework-4.8
upvoted 14 times
tiger25
5 years, 4 months ago
Agreed. NotStore=true tell the client browser not caching anything. But server caching will still work.
upvoted 6 times
...
Dreamchaser1980
4 years, 8 months ago
The question does not state that medical clinics data is sensitive data that should not be cached in secondary storage, although I agree it could be sensitive data. In case of sensitive data you are correct. Any page that potentially contain sensitive information should not be cached on the user's browser and proxy servers. In ASP.NET MVC, you can use the OutputCache noStore = true; attribute to prevent caching for a controller action.
upvoted 1 times
...
...
LeonWang
Highly Voted 5 years, 5 months ago
Should be noStore = false (Although it is the default value) Setting this attribute to true is equivalent to invoking the HttpCachePolicy.SetNoStore method during a Web request. https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.outputcacheprofile.nostore?view=netframework-4.8 This will set the Cache-Control: no-store in response header https://docs.microsoft.com/en-us/dotnet/api/system.web.httpcachepolicy.setnostore?view=netframework-4.8 That will tell browser NOT to cache anything. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
upvoted 9 times
...
zimzimzimma
Most Recent 4 years, 8 months ago
The naming of 'NoStore' is confusing. 'NoStore' = true means that secondary storage is enabled. Naming suggest it is disabled. NO-store is true.
upvoted 2 times
...
rj001
5 years, 4 months ago
noStore = false;
upvoted 3 times
...
[Removed]
5 years, 4 months ago
NoStore=false. You prevent caching on the secondary storage. https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.outputcacheprofile.nostore?view=netframework-4.8
upvoted 6 times
Dev666
4 years, 9 months ago
agree here
upvoted 1 times
...
ozner16
4 years, 7 months ago
your reference also says: "The page that has the OutputCacheProfile.NoStore property set to true issues a response specifying in its header to prevent secondary storage of sensitive information." So "NoStore=true" prevent caching on the secondary storage. I guess microsoft page is wrong with this "true if secondary storage is enabled; otherwise, false", it should be the opposite. https://stackoverflow.com/questions/20895489/outputcache-setting-inside-my-asp-net-mvc-web-application-multiple-syntax-to-pr
upvoted 2 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 ...