70-564 Free Dumps Study Materials
Question 18: You are creating an ASP.NET application by using the .NET Framework 3.5.
You write the following code segment. (Line numbers are included for reference only.)
01 string fileDependencyPath =
Server.MapPath("C:\\BatchOutput.xml");
02
03 Response.Cache.SetValidUntilExpires(true);
You need to ensure that all sessions display the most recent data when a batch process updates the
C:\BatchOutput.xml file.
Which code segment should you insert at line 02?
A. Response.AddCacheItemDependency(fileDependencyPath);
Response.Cache.SetCacheability(HttpCacheability.Public);
B. Response.AddFileDependency(fileDependencyPath);
Response.Cache.SetCacheability(HttpCacheability.Public);
C. HttpCacheability httpcache = new HttpCacheability();
Response.Cache.SetCacheability(httpcache, fileDependencyPath);
D. Response.Cache.SetETag(fileDependencyPath);
Response.Cache.SetCacheability(HttpCacheability.Public);
Correct Answer: B