Thumb.OutputCacheResponse C# (CSharp) Method

OutputCacheResponse() private method

private OutputCacheResponse ( HttpContext, context, DateTime, lastModified ) : void
context HttpContext,
lastModified DateTime,
return void
    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);
    }