https://issues.apache.org/bugzilla/show_bug.cgi?id=56162
--- Comment #9 from Matt Parker <[email protected]> --- (In reply to Sebb from comment #8) > (In reply to Matt Parker from comment #6) > > (In reply to Sebb from comment #5) > > > (In reply to Matt Parker from comment #4) > > > > (In reply to Sebb from comment #2) > > > > > Not sure I understand the use case. > > > > > > > > > > Surely if the PUT changes the target of the GET, the Etag should > > > > > change? > > > > > > > > You're correct, the ETag value does change, and the CacheManager works > > > > properly with respect to this. However, I then want to create a new GET > > > > request specifically to retrieve the full entity, but I no longer have > > > > the > > > > ability to do this once the CacheManager is there. > > > > > > That's the part I don't understand. > > > Surely the next GET after the PUT won't return the cached entry? > > > If it does, then perhaps CM - or the site - is faulty? > > > > Technically, both CM and the site are working properly. But CM's behavior is > > too restrictive to allow me to do what I want. After the PUT, the 2xx > > response from the site includes the updated ETag value. > > But should a PUT response be cached? > > That seems wrong. According to http://tools.ietf.org/html/rfc2616#section-13.10, you're correct: "Some HTTP methods MUST cause a cache to invalidate an entity. This is either the entity referred to by the Request-URI, or by the Location or Content-Location headers (if present). These methods are: - PUT - DELETE - POST" Although, I don't think CM is attempting to act as a true HTTP cache by this definition--I think it's instead acting as an embedded UA component, which is merely aware of cache-related headers. (Please correct me if I'm interpreting this wrong). http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cache_Manager "If a sample is successful (i.e. has response code 2xx) then the Last-Modified and Etag (and Expired if relevant) values are saved for the URL. Before executing the next sample, the sampler checks to see if there is an entry in the cache, and if so, the If-Last-Modified and If-None-Match conditional headers are set for the request." By that definition, CM is behaving appropriately, and it makes sense. I just think it should be expanded to also check if the sampler wants to override the cache header in use. Sorry if I'm misinterpreting something, I'm not actively trying to confuse matters ;) -- You are receiving this mail because: You are the assignee for the bug.
