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

I have set this

maximum_object_size 0 KB
minimum_object_size 0 KB
acl all src 0.0.0.0/0.0.0.0
no_cache deny all

but when I do test for the caching

curl -x ip1:3128 http://blabla.com/iptest.php
sleep 5
curl -x ip2:55555 http://blabla.com/iptest.php

both will return only the fist ip (ip1)

If the sleep is bigger that 30, it will show the ip2 too

LATER EDIT: I see that the problem is if you hit the squid with 2 connsecutive requests it will always exit on the internet with the ip used on the first request

share|improve this question
    
Which is your curl version ? –  Chakri May 25 '12 at 13:11
    
is also happening in firefox... so I'm pretty sure that isn't from curl –  mazgalici May 25 '12 at 13:36

2 Answers 2

up vote 1 down vote accepted

Shouldn't it be cache deny all instead of no_cache deny all?

share|improve this answer
    
tried that too and doesn't work –  mazgalici May 25 '12 at 13:35
1  
Just to make sure I understand this correctly: This is a single instance of squid answering on two different IP addresses and two different ports? Have you checked the access log on blabla.com to see if there is indeed only one request? –  Oliver May 25 '12 at 13:49
    
Maybe I didn't explained very clear. I made 2 requests, one after the other on a ip verification page on. The second request is served from the cache instead of sending to the verification page –  mazgalici May 25 '12 at 14:52
    
Sorry but I still don't get it. What do you test exactly? What is ip1:3128 and what is ip2:55555? What happens and what do you expect to happen? –  Oliver May 25 '12 at 19:29
1  
So the problem is not squid but your test. You are starting with wrong assumptions. If you access squid on one ip address, there is no guarantee that squid itself will fetch the requested data using that same ip address. This is not a caching issue. –  Oliver May 29 '12 at 8:34

In addition to Oliver's answer, you can also put this to your squid.conf

refresh_pattern . 0 100% 0
share|improve this answer
    
tried that too and doesn't work –  mazgalici May 25 '12 at 13:35

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.