-1

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

mazgalici
  • 257
  • 2
  • 5
  • 11

2 Answers2

2

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

Oliver
  • 5,883
  • 23
  • 32
  • 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
  • made a 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". Thanks for the interest – mazgalici May 27 '12 at 19:55
  • 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 08:34
0

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

refresh_pattern . 0 100% 0
Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78