When we perform multiple HTTP request to the same URL but with different headers, the client must cache the response according to the value of the 'Vary' header in the response. Currently, I have the impression it is not the case. I have make a scenario with 2 HTTP Request, one with a header 'Accept : application/json' and the other with the header 'text/plain' (and my server set the header 'Vary' to 'Accept', and the header 'Cache-Control' to 'no-transform, max-age=86400'). When caching is activated, I see only one of the 2 request in the aggregated graph results.
Created attachment 32881 [details] Do not cache responses with Vary header As a simple countermeasure to the described problem we could forbid to store http respones that have a Vary header with any value in it. A more complex solution would have to cache multiple responses for one url depending on the request headers. I think we should start with the simple version and implement the complex one on demand only.
+1 for me
Date: Sun Jul 12 16:25:08 2015 New Revision: 1690478 URL: http://svn.apache.org/r1690478 Log: Do not cache http samples that have a Vary header. Bugzilla Id: 58079 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3618