HttpCachePolicy cache = Response.Cache;
cache.SetCacheability(HttpCacheability.Public); // server cache, proxy cache, client cache
//cache.SetExpires(DateTime.Now.Add(TimeSpan.FromHours(2)));
cache.SetLastModified(DateTime.Now); // If-Modified-Since
cache.SetMaxAge(TimeSpan.FromHours(2)); // important! set maxage of client cache and server cache
cache.SetOmitVaryStar(true);
cache.SetValidUntilExpires(true);
cache.SetVaryByCustom("browser"); // depend on browser cache
cache.VaryByParams.IgnoreParams = true;