[squid-users] ICAP response to avoid backend

Ed ed-squid-cache at s5h.net
Sat Feb 24 17:26:22 UTC 2024


Hi,

Does anyone know a way to tell squid in accelerator mode to not go to 
the backend peers?

There's a couple of requests I'd like to avoid handing off to the 
backend, but, if the data is already a HIT, then I'd like squid to send 
that, just sometimes I don't want it to send the request to the backend.

My thinking is to set a header in the reqmod stage, or set the response 
status there in a way that tells squid to not continue to the backend, 
or to disable for this request only, if the cache already has the 
request stored, then send that response instead, or return a 500-style 
response.

In varnish land this is doable in the vcl_miss hook, but I don't know 
how to do that in squid.

Hope someone else may have walked a similar path previously.

Thanks in advance for your time,
Ed



More information about the squid-users mailing list