apt-proxy/wget/squid caches file indefinitely
Ok, this is driving me bananas. I go to download the latest
unstable packages, only to find that apt-get update
has just retrieved a cached copy of the Packages file that
(in some cases) can be a month old.
Step #1. apt-get places required to apt-proxy to retrieve file.
Step #2. apt-proxy runs: wget --timeout=30 --timestamping
--no-host-directories --tries=1 --no-directories -P
/var/cache/apt-proxy/debian/dists/unstable/main/source -O
/var/cache/apt-proxy/debian/dists/unstable/main/source/.Sources.gz.partial.wget
http://ftp.au.debian.org/debian/dists/unstable/main/source/Sources.gz
(wrapped for easy reading)
Step #3: (with debugging enabled)
wget asks squid for HEAD of the file, and squid returns the old cached
header:
snoopy:stable:~# wget -vd --timeout=30 --timestamping --no-host-directories --tries=1 --no-directories -P /var/cache/apt-proxy/debian/dists/unstable/main/source -O /var/cache/apt-proxy/debian/dists/unstable/main/source/.Sources.gz.partial.wget http://ftp.au.debian.org/debian/dists/unstable/main/source/Sources.gz
DEBUG output created by Wget 1.8.1 on linux-gnu.
--11:04:54-- http://ftp.au.debian.org/debian/dists/unstable/main/source/Sources.gz
=> `/var/cache/apt-proxy/debian/dists/unstable/main/source/.Sources.gz.partial.wget'
Resolving proxy... done.
Caching proxy => 192.168.87.1
Connecting to proxy[192.168.87.1]:3128... connected.
Created socket 4.
Releasing 0x8073510 (new refcount 1).
---request begin---
HEAD http://ftp.au.debian.org/debian/dists/unstable/main/source/Sources.gz HTTP/1.0
User-Agent: Wget/1.8.1
Host: ftp.au.debian.org
Accept: */*
---request end---
Proxy request sent, awaiting response... HTTP/1.0 200 OK
Date: Sat, 06 Sep 2003 01:53:27 GMT
Server: Apache/1.3.27 (Unix) mod_throttle/3.1.2 mod_layout/3.2 PHP/4.3.2
Last-Modified: Fri, 05 Sep 2003 19:33:49 GMT
ETag: "272ba-101358-3f58e51d"
Accept-Ranges: bytes
Content-Length: 1053528
Content-Type: application/octet-stream
X-Cache: MISS from proxy.ozonline.com.au
X-Cache: MISS from muisca.apana.org.au
X-Cache-Lookup: MISS from muisca.apana.org.au:3128
X-Cache: MISS from proxy.melb.apana.org.au
X-Cache-Lookup: MISS from proxy.melb.apana.org.au:3128
Age: 1293088
X-Cache: HIT from snoopy.apana.org.au
X-Cache-Lookup: HIT from snoopy.apana.org.au:3128
Proxy-Connection: close
Length: 1,053,528 [application/octet-stream]
Closing fd 4
Server file no newer than local file `/var/cache/apt-proxy/debian/dists/unstable/main/source/Sources.gz' -- not retrieving.
Step #4: As seen above, wget concludes that the old version is the
most recent version.
Question: Why is squid reporting the header of the obsolete cached file?
Or is this expected and wget is broken?
If I go to download the entire file from scratch, squid will forget
about the old version and download the new version instead.
In squid.conf I have:
refresh_pattern Packages.gz$ 480 20% 1440
refresh_pattern Sources.gz$ 480 20% 1440
So the files in question should have expired some time ago.
--
Brian May <bam@debian.org>
Reply to: