Home » Microsoft » 70-518 » What should you recommend?
You are designing a Windows Presentation Foundation (WPF) application. The WPF application displays indicators to compare your company’s past performance to the current day’s operations data. The WPF application accesses historic data from your company’s data warehouse through a Web service, and accesses current data directly from a Microsoft SQL Server 2008 database.
The WPF application must meet the following requirements:
Retrieve historic data from the data warehouse at application startup and then once per day. Retrieve current data from the database every five minutes, and then update the indicators.
Cache all retrieved data.
Target the .NET Framework 4 Client Profile.
You need to recommend an approach to data caching. What should you recommend?
A. Use System.Web.Caching with a sliding expiration.
B. Use System.Runtime.Caching with an absolute expiration.
C. Use System.Runtime.Caching with a sliding expiration.
D. Use System.Web.Caching with an absolute expiration.
Correct Answer: D
Explanation/Reference:
Correct D,
Original was B, but it is not possible because the application target NET Framework 4 Client Profile and System.Runtime.Caching is not possible. then B,C are OUT
The time interval is fixed (5 minutes) then sliding that work with the user page access is no correct (A OUT) then D.
.NET Framework 4 adds the System.Runtime.Caching namespace. If you are familiar with the System.Web.Caching namespace, System.Runtime.Caching is very similar, although the class names have changed. Microsoft moved it out of the System.Web namespace so that non-web developers did not have to create a dependency on ASP.NET classes.
To use the namespace from a WPF application, you must target .NET Framework 4 instead of the default .NET Framework 4 Client Profile . In Visual Basic.NET, change the target framework by clicking the Advanced Compile Options button on the Compile tab of your project properties dialog box. In C#, change the target framework from the Application tab of your project properties dialog box. In either language, you will need to use the .NET tab of the Add Reference dialog box to reference the System.Runtime.Caching namespace.