Koozali.org: home of the SME Server

Resetting the squid proxy cache

Offline judgej

  • *
  • 375
  • +0/-0
Resetting the squid proxy cache
« on: July 19, 2005, 06:09:57 PM »
I'm using SME 6.5 and having trouble with squid. Basically, squid will not let go of an old IP address.

I moved an external web-site nearly 6 hours ago to a new server with a new IP address. The IP propagated correctly within half an hour: ping points to the new server etc.

Running curl from the server command-line gives me the front page of the new server site. That looks fine.

However, when I try to access the site from a browser, I get the site on the old server. No amount of page refreshing/shift/control/F5/R etc. on IE or FF will give me the new server front page.

Looking at the squid access log, it seems to keep fetching the page from the old server - it lists the old IP address using 'DIRECT' access.

The squid proxy is operating in transparent mode. When I switch that mode off, I can get the new site server *sometimes*, but switching transparent mode back on, I get the old server again *always*.

How can I reset squid so it 'forgets' the IP addresses and pages that it is remembering. IMO it looks like a squid bug, but right now I just want to get around this problem.

Any ideas?

-- Jason

PS 'lynx' run on the server gives me the *old* (incorrect) server, while 'curl' gives me the new server. Presumably 'curl' is bypassing the proxy.
-- Jason

Offline judgej

  • *
  • 375
  • +0/-0
Re: Resetting the squid proxy cache
« Reply #1 on: July 19, 2005, 06:30:09 PM »
Quote from: "judgej"
I'm using SME 6.5 and having trouble with squid.


Or perhaps I'm using 6.0.1 ;-)

I've just noticed even with the transparent proxy [apparently] turned off, I still occasionally get the old site popping up.
-- Jason

Offline raem

  • *
  • 3,972
  • +4/-0
Resetting the squid proxy cache
« Reply #2 on: July 19, 2005, 07:32:00 PM »
Change your browser setting to
IE
Check for newer versions of stored pages = Every visit to the page

Firefox/Netscape
Compare the page in the cache to the page on the network = Every time I view the page
...

Offline judgej

  • *
  • 375
  • +0/-0
Re: Resetting the squid proxy cache
« Reply #3 on: July 19, 2005, 07:34:12 PM »
Hmmm. Now the IP, when I ping the domain, keeps flipping back and forth between the old and the new IP. Perhaps something strange is happening with my ISP - it can't make up its mind what the IP address is.
-- Jason

Offline judgej

  • *
  • 375
  • +0/-0
Resetting the squid proxy cache
« Reply #4 on: July 19, 2005, 07:36:01 PM »
Quote from: "RayMitchell"
Change your browser setting to
IE
Check for newer versions of stored pages = Every visit to the page


Could it be a date/time problem? Between my SME server, the old server and the new server, the times seem to at least 10 minutes out.
-- Jason

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Resetting the squid proxy cache
« Reply #5 on: July 19, 2005, 11:37:59 PM »
Quote from: "judgej"
Hmmm. Now the IP, when I ping the domain, keeps flipping back and forth between the old and the new IP.


That's almost certainly a DNS issue. Even once all authoritative name servers have new information the old can persist in downstream caches until TTL expires.