Hi all,
Is there any reason that Nop is setting the Cache-control header to "private"?
We are trying to get a reverse proxy working to cache content, but reverse proxies MISS all content with a cache control header set to private.
I tried adding the <httpProtocol> section to the web.config but, this sets the cache-control header to "private, public, expires=74464" which still prevents proxies from caching.
<httpProtocol allowKeepAlive="true">
<customHeaders>
<add name="Cache-Control" value="public, max-age=691200" />
</customHeaders>
</httpProtocol>
I have added the following the _Root.cshtml view which seems to give the right results, but I'm concerned that Nop is intentionally set to "private".
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetExpires(DateTime.Now.AddHours(2));
Any thoughts pls?
Regards,
Al