Why does HttpCacheability.Private suppress ETags?

前端 未结 3 1680
天命终不由人
天命终不由人 2020-12-30 22:36

While writing a custom IHttpHandler I came across a behavior that I didn\'t expect concerning the HttpCachePolicy object.

My handler calculates and sets an entity-ta

3条回答
  •  一个人的身影
    2020-12-30 23:12

    Unfortunately if you look at System.Web.HttpCachePolicy.UpdateCachedHeaders() in .NET Reflector you see that there's an if statement specifically checking that the Cacheability is not Private before doing any ETag stuff. In any case, I've always found that Last-Modified/If-Modified-Since works well for our data and is a bit easier to monitor in Fiddler anyway.

提交回复
热议问题