單項(xiàng)選擇題

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

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)搜題