views:

261

answers:

0

I have aspx pages inherit from a basepage class. Each page has a output cache directive with a varybycustom string and I define the string in global.asax.

The website is multilingual and switches language according to query string parameter. I had random cases where the language was switched and a few clicks away one of the pages would still be output cached and would not react to the language being switched.

I added a ValidateCacheOutput function that compared the language and set it to IgnoreRequest if the language was inconsistent with the new site language.

Now, that that happened, data caching with sql dependency on the page was ignored.

How do vary by custom and validatecacheoutout work together as well as data caching?