exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 3 question 14 discussion

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

DRAG DROP -
The GetVendorPolicy() private method in the ProcessedOrderController controller is returning a CacheItemPolicy object with default values. The returned policy must expire if the external file located at C:\Triggers\VendorTrigger.txt has been modified or the timeout outlined in the technical requirements is reached.
You need to return the policy.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to build the method? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Example code:
CacheItemPolicy policy = new CacheItemPolicy();
policy.AbsoluteExpiration = DateTimeOffset.Now.AddSeconds(60.0); policy.ChangeMonitors.Add(newHostFileChangeMonitor(filePaths));
References:
https://msdn.microsoft.com/en-us/library/system.runtime.caching.cacheitempolicy(v=vs.110)

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
anishk
Highly Voted 4 years, 7 months ago
Answer is correct based on the http link in the answers. Thanks
upvoted 5 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 ...