In ASP.NET, is it possible to output cache by host name? ie varybyhost or varbyhostheader?
Posted
by Pure.Krome
on Stack Overflow
See other posts from Stack Overflow
or by Pure.Krome
Published on 2010-05-11T01:57:57Z
Indexed on
2010/05/11
8:04 UTC
Read the original article
Hit count: 308
Hi folks,
I've got a website that has a number of host headers. Depending on the host header, the results are different - both visually (theme'd) and data.
So lets imagine i have a website called 'Foo' - that returns search results (original, eh?).
Now, the same code runs both sites. It is physically the same server/website (using Host Headers) :-
www.foo.comwww.foo.com.au
Now, if i goto '.com', the site is theme'd in blue. if i goto the '.com.au' site, it's theme'd in red.
And the data is different for the same search result, based on the host name (ie. us results for .com, au results for .com.au)
SO .. if i wish to use OutputCaching .. can this be handled / differ by the host name?
I don't want to have the first person goto the .com site .. grab the results ... and the a second person goto my .com.au .. same search data .. and get the theme and results for the .com site.
Possible?
© Stack Overflow or respective owner