AI OnAI Off
Which version are you using?
If you are on an older version and using Web Forms the source code for PageBase contains SetCachePolicy() and can be found here:
http://sdk.episerver.com/library/cms6.1/html/T_EPiServer_PageBase.htm
I recall you get private if you are signed in or running it on localhost.
Hi Johan,
I overcame this by using this in my base page
var cache = System.Web.HttpContext.Current.Response.Cache; cache.SetCacheability(HttpCacheability.Public); cache.SetExpires(DateTime.UtcNow.AddMinutes(15));
Hey,
So I have spent quite a few hours trying to work out why my website insits on adding Cache-Control: private to all requests. For dynamic content I don't want it set to private so that my CDN will cache those pages. If you bring up a bash window you can check the header using:
All the Episerver demo sites come back with:
I have tried editing Episerver.config, I have tried removing it and readding it using customheaders but the best I can get to is Cache-control:private, public. Has anyone managed to find out where the private is being added?
Thanks
Adam