![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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.Pu blic); 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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |