Is there a way to disable Chrome's in-memory cache without changing caching headers in responses?
I found a few answers about disabling cache, caching headers, CLI arguments (like --disk-cache-size=1 and a few others), none of them seem to be able to disable the memory cache. Using the --disk-cache-size=1 flag, I was able to disable disk cache, but I couldn't find a way to do the same thing for memory cache.
In my scenario, I run automated tests that load a page with a request that responds with a caching header. However, I want this resource to be loaded each time a test runs, even if the browser is not restarted (performance reasons), in order to properly simulate delayed page loads. I have no means to change the request or response in any way, so I have to change how the browser loads it.
For the first test run, this works fine thanks to --disk-cache-size=1, but subsequent runs don't work because Chrome loads the resource from memory.
Neither I can change the request, nor the response, so changing caching headers or appending something to the URL of the resource is not an option. I want to run those tests in an automated fashion, so disabling the cache in devtools also doesn't work. Thus browser extensions also aren't feasible.
Is there any other way to disable the in-memory cache in Chrome (or other chromium-based browsers)?