S
Sebastian Paul
Hi,
the task is easy: I want to have the Cache-Control set to Public.
void IHttpHandler.ProcessRequest(HttpContext context)
{
const int maxAge = 10;
_context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(maxAge));
_context.Response.Cache.SetMaxAge(new TimeSpan(0, 0, maxAge));
_context.Response.Cache.SetCacheability(HttpCacheability.Public);
_context.Response.Cache.SetLastModified(DateTime.Now);
_context.Response.Cache.SetValidUntilExpires(true);
...
}
Things work fine, output is actually cached by ASP.NET, the HTTP
header value of max-age counts down to zero until content expires.
Only the Cache-Control keeps being private. Why?? I explicitly set the
value to HttpCacheability.Public...
Thanks for any help.
Sebastian
the task is easy: I want to have the Cache-Control set to Public.
void IHttpHandler.ProcessRequest(HttpContext context)
{
const int maxAge = 10;
_context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(maxAge));
_context.Response.Cache.SetMaxAge(new TimeSpan(0, 0, maxAge));
_context.Response.Cache.SetCacheability(HttpCacheability.Public);
_context.Response.Cache.SetLastModified(DateTime.Now);
_context.Response.Cache.SetValidUntilExpires(true);
...
}
Things work fine, output is actually cached by ASP.NET, the HTTP
header value of max-age counts down to zero until content expires.
Only the Cache-Control keeps being private. Why?? I explicitly set the
value to HttpCacheability.Public...
Thanks for any help.
Sebastian