Exemplo n.º 1
0
 private void SetFileCaching(HttpResponseBase response, string fileName)
 {
     response.AddFileDependency(fileName);
     response.Cache.SetETagFromFileDependencies();
     response.Cache.SetLastModifiedFromFileDependencies();
     response.Cache.SetCacheability(HttpCacheability.Public);
     response.Cache.SetMaxAge(new TimeSpan(7, 0, 0, 0));
     response.Cache.SetSlidingExpiration(true);
 }