Is it possible to change the output cache and it's duration for specific control, from code-behind?
I mean, let's say I have control News.ascx
that has:
<%@ OutputCache Duration="60" VaryByCustom="language" %>
Now I want to write somewhere some code, that will decide dynamically if use output cache and what will be the duration of that cache. Is it possible?
I thought, that I will able to use custom OutputCacheProvider
that described on CodeProject, but I can't find a way how to do it.