I forgot to mention: I am still using Framework 1.1 - for just a
little more time
On Feb 8, 4:21 pm, "DC" <d...@upsize.de> wrote:
> Hi,
>
> in the codebehind of an .aspx, I am doing the following (in
> Page_Load):
>
> int cacheDuration = 10;
> TimeSpan cacheSpan = new TimeSpan(0, 0, cacheDuration);
> DateTime now = DateTime.Now;
> Response.Cache.VaryByParams.IgnoreParams = false;
> Response.Cache.VaryByParams["parm1;parm2"] = true;
> Response.Cache.SetLastModified(now);
> Response.Cache.SetExpires(now.Add(cacheSpan));
> Response.Cache.SetMaxAge(cacheSpan);
> Response.Cache.SetCacheability(HttpCacheability.Public);
> Response.Cache.SetValidUntilExpires(true);
>
> Caching works, but if I add alternating values to URL parameters
> (parm1 + parm2) the page will still be refreshed every 10 seconds,
> regardless of what the parameters contain.
>
> TIA for any hint on what could be the reason for this.
>
> Regards
> DC