views:

973

answers:

1

Hi guys

I have just started using OutputCache on some of my controller actions and I am not quite getting the response I would expect.

Basically I have set Location = OutputCacheLocation.Any and the http header is as follows:

Server              ASP.NET Development Server/9.0.0.0
Date                Wed, 15 Jul 2009 02:14:21 GMT
X-AspNet-Version    2.0.50727
X-AspNetMvc-Version 1.0
Content-Encoding    gzip
Cache-Control       private, max-age=3600
Expires             Wed, 15 Jul 2009 02:14:21 GMT
Last-Modified       Wed, 15 Jul 2009 02:14:20 GMT
Vary                *
Content-Type        text/html; charset=utf-8
Content-Length      640
Connection          Close

Now if my interpretation is correct the Cache-Control part being set to private means that it will only be cached on the client. I need to also be cached on any proxy.

I would have expected that by setting OutputCacheLocation.Any the Cache-Control would have been something like "public, max-age=3600". As far as I know the private means it will only be cached on the client and not by "Any" (i.e. proxies - see http://msdn.microsoft.com/en-us/library/system.web.httpcacheability.aspx).

Any ideas?

Cheers Anthony

A: 

See comments above for solution

vdh_ant