Re: Don't negative cache 400 responses.

2016-11-10 Thread Alan Carroll
Yes. I originally looked at a plugin but as I thought about it I came to the conclusion that negative caching 400 is simply the wrong thing to do, because it is dependent on the user agent, not the origin server, and likely has no relationship to the success of subsequent requests, which is diff

Re: Don't negative cache 400 responses.

2016-11-10 Thread Sudheer Vinukonda
Just for the sake of completeness, it should be fairly straightforward to write a plugin or even use conf_remap/header_rewrite to basically strip Cache-Control headers from the Origin AND override proxy.config.http.negative_caching_enabled to false on a 400 status from the Origin. Although, my

Re: Don't negative cache 400 responses.

2016-11-09 Thread Alan Carroll
Yes, it's about proxy.config.http.negative_caching_enabled. My reading of the document is that 1) If enabled, the negative response is cached regardless of any Cache-Control: value.2) If disabled, the negative response is cached only if origin provide Cache-Control indicates it should be.

Re: Don't negative cache 400 responses.

2016-11-09 Thread Miles Libbey
Are we just talking about proxy.config.http.negative_caching_enabled https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-http-negative-caching-enabled If so, then the doc implies that it only affects responses without cacheable Cache-control direct

Re: Don't negative cache 400 responses.

2016-11-09 Thread Sudheer Vinukonda
As with any kind of response caching, the presumption is that, *if* the Origin included Cache Control headers that permitted Caching of a 400 response, it (the Origin) must know and expect that subsequent requests with matching "cache key" may be served directly from the caches. If the Origin di

Re: Don't negative cache 400 responses.

2016-11-09 Thread Alan Carroll
But that would be very specific to the bad request. Why would it benefit the next request to be denied with that same response? On Wednesday, November 9, 2016 11:23 AM, Sudheer Vinukonda wrote: Generally, I'd think if the Origin responded with Cache-Control headers that permit cachin

Re: Don't negative cache 400 responses.

2016-11-09 Thread Sudheer Vinukonda
Generally, I'd think if the Origin responded with Cache-Control headers that permit caching, it should be cached.  For e.g., for a 400 response, the Origin may include a Cache-Control: Vary header indicating what parts of the request that it didn't like. - Sudheer From: Alan Carroll To: D