Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Squid Proxy setup on a windows server with 4 ip addresses available on it. In the config file, squid listens to 4 different ports and assigns an outgoing ip address from the 4 available, depending on the port it entered on.

On my browser, I enter the proxy details and point it to port 3. I then navigate to a webpage that gives you details on the extarnal IP address calling the webpage. according to the port I have setup, the ip address is correct. I then change my browser to point to port 2 and navigate to the same web page. The reults returned remain the same as the results I got pointing to port 3, however, if I give it about 3 minutes and refresh the page, the ip changes to the correct address for port 2.

What I gather from this is that squid is caching the ip adress for 5 minutes until a new call come through. How do I disable caching?

share|improve this question

To disable caching completely you can use the

cache deny all

directive on the more recent squid versions. For older versions you can check what can be done in the squid FAQ.

share|improve this answer
I tried that but doesnt seem to be working – user33121 Jun 29 '10 at 9:01
Have you tried the other options at the FAQ as well? If yes, then the actual problem is not in squid. How do you assign the outgoing IP based on the port? – Zizzencs Jun 29 '10 at 9:11

You can use acls and other parameters to specify the situation in which you would not want to cache.

For directories:

acl DIRECTORIES urlpath_regex ^/here/ ^/favicon.ico ^/there/
cache deny DIRECTORIES
cache deny all

In the past, I have typically used a network mask:

acl all src
no_cache deny all

Changes are another acl is taking priority if you simply insert no_cache deny all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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