protected void Page_Load(object sender, EventArgs e) {if (!IsPostBack) {string fileDependencyPath = Server.MapPath("~/TextFile1.txt"); Response.AddFileDependency(fileDependencyPath); Response.Cache.SetExpires(DateTime.Now.AddSeconds(10)); Response.Cache.SetCacheability(HttpCacheability.Public); Response.Cache.SetValidUntilExpires(true); Cache.Insert("test1", DateTime.Now.ToString(), new System.Web.Caching.CacheDependency(fileDependencyPath));}} 這是一個依賴緩存,如何判斷依賴緩存的失效
- 2 回答
- 0 關注
- 628 瀏覽
添加回答
舉報
0/150
提交
取消