Hi,
In the console output I keep seeing this:
14:44:03.358 [GatlingSystem-akka.actor.default-dispatcher-6] INFO
c.e.e.g.h.action.HttpRequestAction - Bypassing cached Request
'<MyRequestName>': Scenario 'Update feeds via json', UserId #<N>
What exactly does this mean? are these requests actually skipped?
I've looked in HttpRequestAction#execute, but it's not quite clear,
I'm afraid ...
Cheers,
Excilys
September 14, 2012, 3:16pm
2
Hi,
Exactly, it means that your requests was skipped because it was considered as cached.
See https://github.com/excilys/gatling/issues/623
Please note that the caching strategy is currently quite simplistic:
https://github.com/excilys/gatling/commit/3a9882f8c7017f08f7b8a2a4d891f78e882c77a7#L3R74
And I’m afraid HttpRequestAction#execute can’t be clearer:
https://github.com/excilys/gatling/blob/master/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/action/HttpRequestAction.scala#L101
What’s the problem? Don’t you expect your request to be cached?
Cheers,
Stéphane
2012/9/14 Ilya Dmitrichenko <errordeveloper@gmail.com >
Hi,
Exactly, it means that your requests was skipped because it was considered
as cached.
See Add caching support · Issue #623 · gatling/gatling · GitHub
Please note that the caching strategy is currently quite simplistic:
Introduce basic caching support, close #623 · gatling/gatling@3a9882f · GitHub
I see ...
def isCached(session: Session, request: Request) =
getCache(session).contains(request.getUrl)
perhaps it should do a checksum look-up instead of just the URL, isn't it?
And I'm afraid HttpRequestAction#execute can't be clearer:
https://github.com/excilys/gatling/blob/master/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/action/HttpRequestAction.scala#L101
Well, I was just hoping that it meant not what I thought it did...
What's the problem? Don't you expect your request to be cached?
Looks like for the API load tests in general the caching should be disable ...
Perhaps the wiki should say somewhere that some users might want to
disable caching, don't you think?
Also, actually I reckon, Gatling, as a client should only cache
responses to the GET requests, ... right?
Cheers,
Excilys
September 14, 2012, 5:19pm
4
I see …
def isCached(session: Session, request: Request) =
getCache(session).contains(request.getUrl)
perhaps it should do a checksum look-up instead of just the URL, isn’t it?
What do you mean? A checksum of the resource? That would imply fetching it and that’s the opposite of caching.
And I’m afraid HttpRequestAction#execute can’t be clearer:
https://github.com/excilys/gatling/blob/master/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/action/HttpRequestAction.scala#L101
Well, I was just hoping that it meant not what I thought it did…
What’s the problem? Don’t you expect your request to be cached?
Looks like for the API load tests in general the caching should be disable …
Not if the goal is to mimic browsers behavior where caching is the default.
But you can disable it: call .disableCaching on the httpConfig.
Perhaps the wiki should say somewhere that some users might want to
disable caching, don’t you think?
Of course, it will
This is a new feature, so it’s not documented yet as 1.3.0 has not been released yet.
See the milestone on the mentioned issue.
Also, actually I reckon, Gatling, as a client should only cache
responses to the GET requests, … right?
I’ll check ASAP but I think caching is only a matter of headers Cache-Control, Expires and ETag (not supported yet).
Cheers,
Stéphane
Excilys
September 14, 2012, 6:31pm
5