On Fri, 2007-11-23 at 23:51 +0000, Mark Hindley wrote: > On Fri, Nov 23, 2007 at 01:46:22PM -0800, Ross Boylan wrote: > > The apt-cacher logs clearly show much different last-modified times from > > the http headers for Release and Release.gpg, consistent with my somehow > > having gotten an old Release file. But why? > > I *think* I finally have an idea about this. > > Someone between you and your mirror is running squid, or some other > cache (perhaps transparently). Squid uses some fancy magic to determine > whether to revalidate any request based on how frequently it thinks the > upstream is changed etc..... > My ISP says they do not run a proxy, and doubt there's one on their provider either. In any event, it seems odd that 2 files with the same timestamp, fetched at virtually the same time, would be treated differently. > In your case, it has not revalidated but just assumed that it's current > file is still current. > > Apt gets round this by specifying Cache-Control: max-age=0 in the > request which apt-cacher does not understand or pass on. > > If I am correct, the following patch should fix it for you. It is a bit > inflexible, and I have a better one in 1.6.0pre8 whcih I am just > finishing testing, along with lots of other goodies like IPv6, > berkeleydb for checksum, multiple daemon addresses, and support for > using pdiffs to update Package files in the cache. > > Could you try it and let me know if I am on the right track I'll give it a shot. > > Mark > > > > diff --git a/apt-cacher b/apt-cacher > index eb52622..4ed0da5 100755 > --- a/apt-cacher2 > +++ b/apt-cacher2 > @@ -1570,6 +1570,9 @@ sub ua_act { > debug_message ("download agent: setting no-cache"); > $ua->default_header('Cache-Control' => 'no-cache', 'Pragma' => > 'no-cache'); > } > + elsif ($is_index_file) { > + $ua->default_header('Cache-Control' => 'max-age=0'); > + } > > debug_message("download agent: getting $url"); > if($only_head) { > > >
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]