Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 2015 14:05:12 +0600
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: pkg and HTTP caches
Message-ID:  <20151127080512.GA89598@admin.sibptus.tomsk.ru>
In-Reply-To: <20151127065928.GD939@ivaldir.etoilebsd.net>
References:  <20151127031348.GA81677@admin.sibptus.tomsk.ru> <20151127065928.GD939@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Baptiste Daroussin wrote:
> > 
> > While accessing the FreeBSD package database via a corporate HTTP
> > proxy, I have noticed that all fetches are cache misses (see below). I
> > think this is because of the "Cache-Control: max-age=0" directive.
> > 
> > While I can probably understand the reason to never cache repository
> > metadata, I completely fail to see what the problem is with caching
> > packages proper. Taking into account the amount of packages I install
> > and upgrade on several identical systems, caching them would
> > sufficiently save bandwidth.
> > 
> > Any comments please?
> > 
> The problem is some packages can be rebuilt with nothing changing
> (we do not have reproducible build yet) 

This process should result in the modification time of the package
file being updated.

After all, a FreeBSD packages repository is just a Web server serving
static files from the disk, isn't it? At least my personal repository
surely is.

> meaning if you have a cache
> proxy, the proxy might be giving you the old version and not the new
> one resulting in pkg rejecting the package because checksum mismatch
> with what it expects.

Isn't that what we have the "Last-Modified:" HTTP header for? A
caching proxy should consider an object stale if its modification
time on the Web server has changed.

Please correct me if I am wrong.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151127080512.GA89598>