How-To: Programatically Set Output page caching
Hello All,
I am trying to create this system such that i can change have the user set how long they want their homepage to be cached for, which i'm not sure entirely if i can do it beccause that value might have to be static and compiled into the app and if this is the case that's fine i'll set one value for all homepages. But anyways, i need something to do the following:
We have the way of declaritevly settings the output cache in the html side of things:
<%@ OutputCache Duration="60" VaryByParam="SID"%>
What i want is to be able to do this in the codebehind.
Is there such a thing that exists?
i know you can set the cachetime out and what not with
response.Cache.SetExpires and whatever else, but i have not found how to set the varybyparams programitcally which is a very big piece for me! thanks for all the great help in advance!
JR
|