How actually cache simulation works in Gatling?

I have problem.

I recorded script, and I checked box “inferHtmlResources”. Everything went well. I have two main requests:
request_0 with method POST, and request_6 which is POST too…but hey!

I have eleven requests recorded on my table. Why? I found it, static elements from the requests have been saved as a separate GETters.

Now it’s very tricky. Real browser use cache to get all elements like .js and.gif with the first request, and get this stuff from cache when it comes to the second request.
Gatling will send 11 request but part of it should be in cache.

I completely don’t understand this behavior.
Should I every time delete elements from embedded resources when I found them repeated? Or no using recording with .inferHtmlResources? Or should I use .inferHtmlResurces only with playing my load test?

Please help me.

`

class RecordedSimulation extends Simulation {

val httpProtocol = http
.baseURL("http://myBaseAdress.com)
.inferHtmlResources()

val uri1 = “http://myBaseAdress.com

val scn = scenario(“RecordedSimulation”)
.exec(http(“request_0”)
.post("/FirstView.rdf")
.formParam(“clearOrder”, “false”)

.resources(http(“request_1”)
.get(uri1 + “/tooltip.js”),
http(“request_2”)
.get(uri1 + “/tooltip2.js”),
http(“request_3”)
.get(uri1 + “/tooltip3.js”),
http(“request_4”)
.get(uri1 + “/tooltip4.js”),
http(“request_5”)
.get(uri1 + “/searchOff.gif”)
))

.exec(http(“request_6”)

.post("/SecondView.rdf")
.formParam(“clearOrder”, “false”)

.resources(http(“request_7”)
.get(uri1 + “/tooltip.js”),
http(“request_8”)
.get(uri1 + “/tooltip2.js”),
http(“request_9”)
.get(uri1 + “/tooltip3.js”),
http(“request_10”)
.get(uri1 + “/tooltip4.js”),
http(“request_11”)
.get(uri1 + “/searchOff.gif”)
))
.pause(6)

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}

`

I think we load test to discern the bottlenecks in our application. Static resources are normally returned from CDNs or S3 or something. I think we should concentrate on the logic of our application and not how fast a web server returns static resources. I tend to leave them out of the Gatling simulation.