Hi,
HttpSampler can only have one CacheManager. Do you see in logs: "Existing
CacheManager {} superseded by {}"? - emitted by setCacheManager.
In code CacheManager it is selected that way as below.
@Override
public void addTestElement(TestElement el) {
if (el instanceof CookieManager) {
setCookieManager((CookieManager) el);
} else if (el instanceof CacheManager) {
setCacheManager((CacheManager) el);
} else if (el instanceof HeaderManager) {
setHeaderManager((HeaderManager) el);
} else if (el instanceof AuthManager) {
setAuthManager((AuthManager) el);
} else if (el instanceof DNSCacheManager) {
setDNSResolver((DNSCacheManager) el);
} else if (el instanceof KeystoreConfig) {
setKeystoreConfigProperty((KeystoreConfig) el);
} else {
super.addTestElement(el);
}
}
Do you see your guiclass/testclass in saved jmx?
Regards,
Mariusz
On Thu, 2 Apr 2020 at 10:43, Draelants Geert <[email protected]>
wrote:
> Hi,
>
> Does anybody know how I can replace the HTTP cache manager with my own
> implementation?
>
> I’m trying to extend the default one with options to (1) consider all
> Cache-Control headers (and not just the last one) and (2) process the
> Pragma header.*
>
> What I’ve done is extended CacheManager and CacheManagerGui and put my
> ‘plugin’ in lib\ext.
> I can then add the element in the Test Plan but the HTTP sampler will not
> pick it up and continues to rely on
> org.apache.jmeter.protocol.http.control.CacheManager.
>
> What am I missing? I am using JMeter v5.2.1 btw.
> I know I can always replace the .class files in ApacheJMeter_http.jar but
> I’m not there yet.
>
> Thanks in advance for your help!
>
> Regards,
> Geert
>
> * Yes, it is obsolete as of HTTP 1.1 but not all browsers seem to know
> that.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>