Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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 0.0.0.0/0.0.0.0
no_cache deny all

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

share|improve this answer
add comment

Your Answer

 
discard

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.