Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use multiple VaryByCustom parameters when caching a user control?

I've been trying this a couple of different ways, but it's not working for some reason. Is it even possible?

like image 778
Kilhoffer Avatar asked Sep 25 '08 18:09

Kilhoffer


2 Answers

Yes. Separate them in your declaration by semicolons.

like image 119
user9991 Avatar answered Oct 05 '22 04:10

user9991


If you are overriding GetVaryByCustomString() in the Global.asax.cs file, you can pass in a semicolon delimited list of values which you then need to parse.

There is one built-in value (Browser) which will be used if the attribute specified does not exist.

like image 26
Timothy Lee Russell Avatar answered Oct 05 '22 04:10

Timothy Lee Russell