-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiler does not show response if Cache plugin is used #243
Comments
i am surprised why we then see the request at all, but not deep enough into the profiling to tell. is there a reason why we don't treat a cached response the same as a response from the server? i think the plugins that come before the cache in the chain should be executed the same way regardless of cache hit or miss. or do we record the request when it enters the chain, but the response when its received from the server, before processing it in the plugin chain? then indeed, we might add a check when the response leaves the chain, and record it there if it was not yet recorded, and add some kind of warning that this is a cached response because no "real" request has been sent. detecting cache hits in the debug toolbar sounds useful anyways. |
is this still relevant? has it meanwhile been solved, or is it important to have this? |
Yes |
thanks a lot for the analysis, @ostrolucky - great job!
can we be sure that the first profile that has something is the right one? we should not display something arbitrarily, or in special cases show things from a previous request, or some such problem.
that would be quite neat if that works. before we do large refactorings, could we fix the situation by having ProfileClient detect when the $next was never called and attach the necessary information in that special case? working with the cache would not work if somebody for some reason implements e.g. their own cache plugin that works differently and does not do the events. |
ProfilePlugin can do it perhaps, or Collector. ProfileClient not, because it is not activated in this case. |
Without using cache plugin:
Now do this
plugins: - 'httplug.plugin.content_length' - 'httplug.plugin.redirect' + - 'httplug.plugin.cache'
Result:
I'm aware this is because Cache plugin does not pass response over to other middlewares when cache is hit, but this is major usability restriction of Profiler. I would like to not wait for response while developing, but still see responses pulled out of Cache plugin. There should be a workaround in place
The text was updated successfully, but these errors were encountered: