I wanted to use this statement
<%@ OutputCache Duration="20" Location="Any" VaryByParam="none"%>
for our homepage.
(this works by the way)
But there are multiple domains pointing to the same site, like mydomain.fr and mydomain.ch.
Then, in the basepage i set the culture of the site to fr-FR if they typed mydomain.fr, de-CH when they typed mydomain.ch etc.
I was wondering, as both url’s would load the same page /default.aspx, is the page served the same for both users (so when .fr comes first, the .ch visitor sees the (cached) .fr page), or does the framework think and say: hey, mydomain.fr/default.aspx is not the same as mydomain.ch/default.aspx, even if it’s the same fysical page, so let’s NOT take the cached one and recreate (and cache) a new version?
I’ve read about varybyheader for the page output caching, but .fr vs .ch is not a header i think?
You could vary it by the
HOSTheader, which would mean that each domain would have its own cache set.The
HOSTheader contains the hostname/domain name that the browser loaded; So,mydomain.frormydomain.ch, etc.