單項(xiàng)選擇題

你為一家公司的采購部門做了一個ASP.NET應(yīng)用程序。應(yīng)用程序中的一個頁面用來顯示供應(yīng)商的產(chǎn)品清單,產(chǎn)品的種類或價格,頁面的URL以這個信息做參數(shù)。你想把ASP.NET頁面基于這個參數(shù)的值在緩存區(qū)中保存多個版本,希望每個版本都緩存300秒,你需要添加代碼來達(dá)到這個目標(biāo),你需要用哪個代碼段?()

A.ResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("?")=true
B.ResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("All")=true
C.ResponsCachSetCacheability(HttpCacheability.Public)ResponsCachSetLastModified(DateTimParse("00:05:00"))ResponsCachVaryByParams("All")=true
D.ResponsCachSetCacheability(HttpCacheability.PublicResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("*")=true

微信掃碼免費(fèi)搜題