0

I have a local / internal Squid proxy setup to make all HTTP requests through a parent HTTP proxy that requires authentication. What I would like to do is have the HTTP resources saved in the local Squid cache so that subsequent requests are served up from there rather than re-downloading from the parent.

My configuration looks something like this:

nonhierarchical_direct off

http_port 10101
acl port_10101 localport 10101
always_direct deny port_10101
never_direct allow port_10101

cache_peer parent.example.com parent 8080 0 no-query proxy-only login=user:pass connect-fail-limit=99999999 name=default_proxy
cache_peer_access default_proxy allow port_10101 
cache_peer_access default_proxy deny !port_10101

never_direct allow all
http_access allow all

I have tried removing proxy-only but that didn't do much.

This is for Squid 3.5.

1

I think you need to inspect the headers returned by the parent proxy. Normally, content that requires authentication is marked as uncacheable. Refer to RFC2616 section on "What Is Cacheable." If the parent is indicating that the response is uncacheable, then squid should be required to honor that, per RFC compliance.

  • I hadn't thought of that and it's a very good point. I will check out the headers and look into forcing the caching – Neil C. Obremski Sep 28 '18 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.