private void OutputCacheResponse(HttpContext context, DateTime lastModified)
{
HttpCachePolicy cachePolicy = context.Response.Cache;
cachePolicy.SetCacheability(HttpCacheability.Public);
cachePolicy.VaryByParams["img"] = true;
cachePolicy.VaryByParams["w"] = true;
cachePolicy.VaryByParams["h"] = true;
cachePolicy.VaryByParams["c"] = true;
cachePolicy.VaryByParams["b"] = true;
cachePolicy.VaryByParams["i"] = true;
cachePolicy.VaryByParams["p"] = true;
cachePolicy.SetOmitVaryStar(true);
cachePolicy.SetExpires(DateTime.Now + TimeSpan.FromDays(7));
//cachePolicy.SetExpires(DateTime.Now);
cachePolicy.SetValidUntilExpires(true);
cachePolicy.SetLastModified(lastModified);
}