well, TS-3331 TS-2633 all talking about negative caching issues, during the change, I’d proposal a more adaptable change for your comments:
The negative cache is causing some confusion when it is cached by accident, the current state machine working as: ===current=== if expire time set(by Expire or CC-maxage) then set expire time according to origin server response. else if http.negative_caching_enabled = 1 ( which default to 0 ) then set expire time to http.negative_caching_lifetime ( which default to 1800s ) else no cache when some origin server in trouble, there will be very common case to get some negative response with expire time set, and long expire time as 200 responses maybe. that will give us trouble when we running in CDN service. so there should make some change on that state machine to make a forced expire time when ATS get a negatived response from origin: ===proposal #1=== case http.negative_caching_enabled = 0 ( which default to 0 ) no cache at all ( that is, remove the expiretime even it have ) case http.negative_caching_enabled = 1 if expire time set(by Expire or CC-maxage) then set expire time according to origin server response. else set expire time to http.negative_caching_lifetime ( which default to 1800s ) case http.negative_caching_enabled = 2 then set expire time to http.negative_caching_lifetime to all ( mostly we should set a very short expire time here ) well, a modified version that will compatible with current codes, we force all the expire time to negative_caching_lifetime if http.negative_caching_enabled = 2 === proposal #2=== if expire time set(by Expire or CC-maxage) if http.negative_caching_enabled = 2 then set ALL negative response expire time to http.negative_caching_lifetime ( mostly we should set a very short expire time here ) else then set expire time according to origin server response. else if http.negative_caching_enabled > 0 ( which default to 0 ) then set expire time to http.negative_caching_lifetime ( which default to 1800s ) ### this set no expire time negative to 1800s, mostly we should set a very short expire time here else no cache thanks for your comments - Yongming Zhao 赵永明