caddyserver / cache-handler

Distributed HTTP caching module for Caddy
Apache License 2.0
235 stars 17 forks source link

http.handlers.cache Reused response from concurrent request with #75

Closed StephenMiracle closed 3 months ago

StephenMiracle commented 3 months ago

I am getting the http.handlers.cache Reused response from concurrent request with .. log in my error logs consistently. I'm unsure if this is a legitimate issue and what the user experience is when they receive it. Is this something I should be concerned about and how should I interpret it?

mohammed90 commented 3 months ago

That's an info level log, not error.

https://github.com/darkweak/souin/blob/647f9d8c4c162e70cb86739f6a99dfad89a1ff67/pkg/middleware/middleware.go#L393-L411

https://github.com/darkweak/souin/blob/647f9d8c4c162e70cb86739f6a99dfad89a1ff67/pkg/middleware/middleware.go#L456-L463

It means that there were multiple concurrent requests asking for the same resource/value, and the response is shared across the repetitive requests.