CacheManager suppresses necessary server calls in case of existing etags and CacheManager.useExpires is true
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
### Expected behavior
In case of a HTTP GET request with an existing ETag in the server response http header I would expect:
- that another HTTP GET request to the same URL and with identical parameters would be send to the server with a corresponding If-None-Match=eTag in the request http header.
- in other words: that jmeter execute this sampler as it would do in the case that no HTTP CacheManager is active.
### Actual behavior
if the CacheManager is configured with flag useExpires=true the second request is suppressed because the CacheEntry element
get a expiredDate `System.currentTimeMillis() + ONE_YEAR_MS`
[cacheManagerUseExpires.log](https://github.com/user-attachments/files/22642213/cacheManagerUseExpires.log)
### Steps to reproduce the problem
copy the attached file etag.txt to file etag.jmx and open it in jmeter
1. start the HTTP Mirror Server
2. execute the script
3. uncheck the checkbox _Use Cache Control/Expires header when processing GET requests_ in HTTP CacheManager GUI
4. execute the script again and check different behaviour between the two testruns
[etag.txt](https://github.com/user-attachments/files/22642450/etag.txt)
### JMeter Version
5.6.3
### Java Version
openjdk version "17.0.8" 2023-07-18 LTS
### OS Version
Microsoft Windows [Version 10.0.22631.5909]
Contributor guide
Assessment
This issue has not been assessed yet.