Bug 63574

Summary: HTTP Cache Manager does not cache resource if Cache-Control header is missing
Product: JMeter - Now in Github Reporter: Flavio Pepino <flavio6311>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2 Keywords: FixedInTrunk
Version: 2.13   
Target Milestone: JMETER_5.2   
Hardware: All   
OS: All   
Attachments: HTTP CACHE MANAGER

Description Flavio Pepino 2019-07-20 22:22:05 UTC
Created attachment 36669 [details]
HTTP CACHE MANAGER

ON the jmeter.apache.org, there is a file new-style.css that I'd want to add to cache. However, this file is not cached by using the HTTP Cache Manager with the default options. The file has two caching headers Last-Modified  and  ETag. 

In my view, that file should be cached in conformity to its headers.
It's easy to reproduce my question. Just add one HTTP sampler to Jmeter Home and iterate two times. After that, examine the view result tree, looking for new-style.css in both iterations.
Comment 1 Philippe Mouawad 2019-07-28 09:15:30 UTC
My understanding of this https://paulcalvano.com/index.php/2018/03/14/http-heuristic-caching-missing-cache-control-and-expires-headers-explained/ and rfc leads to the fix I made.

@Team, can you please review and confirm that I am correct ?

Thanks
Comment 2 Philippe Mouawad 2019-07-28 09:15:57 UTC
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 5883d81  Bug 63574 - HTTP Cache Manager does not cache resource if Cache-Control header is missing
5883d81 is described below

commit 5883d81abf5f0b4e7f4134aa6560ba21a62f5c43
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Sun Jul 28 11:14:31 2019 +0200

    Bug 63574 - HTTP Cache Manager does not cache resource if Cache-Control
    header is missing

    This resolves Bug 63574
---
 .../jmeter/protocol/http/control/CacheManager.java |  4 ++--
 .../http/control/TestCacheManagerBase.java         | 22 ++++++++++++++++++++++
 xdocs/changes.xml                                  |  3 ++-
 3 files changed, 26 insertions(+), 3 deletions(-)
Comment 3 The ASF infrastructure team 2022-09-24 20:38:17 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5121