Merge lp:~tribaal/squid-deb-proxy/refresh-ims into lp:squid-deb-proxy

Proposed by Chris Glass
Status: Merged
Merged at revision: 124
Proposed branch: lp:~tribaal/squid-deb-proxy/refresh-ims
Merge into: lp:squid-deb-proxy
Diff against target: 16 lines (+3/-3)
1 file modified
squid-deb-proxy.conf (+3/-3)
To merge this branch: bzr merge lp:~tribaal/squid-deb-proxy/refresh-ims
Reviewer Review Type Date Requested Status
squid-deb-proxy-developers Pending
Review via email: mp+227217@code.launchpad.net

Description of the change

This branch adds "refresh-ims" options to the refresh patterns for index files.

The reason for this is that archives usually set a cache-control header on them, and so in some cases the proxy will have mismatching indexes/packages (I see "Hash sum mismatch" errors when this happens).

The proposed change tells squid to forward the request upstream if it has a If-Modified-Since header (that apt sets), and so we let the upstream archive decide if the cache is fresh or not.

Since it answers only a simple 304, bandwidth overhead is minimal, and that prevents users from seeing errors in this rare but possible case (we see his more often on automated system deployments, obviously).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'squid-deb-proxy.conf'
2--- squid-deb-proxy.conf 2013-09-20 10:08:11 +0000
3+++ squid-deb-proxy.conf 2014-07-17 16:09:37 +0000
4@@ -56,9 +56,9 @@
5 refresh_pattern tar.gz$ 129600 100% 129600
6
7 # always refresh Packages and Release files
8-refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0
9-refresh_pattern \/Release(|\.gpg)$ 0 0% 0
10-refresh_pattern \/InRelease$ 0 0% 0
11+refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
12+refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
13+refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
14
15 # handle meta-release and changelogs.ubuntu.com special
16 # (fine to have this on debian too)

Subscribers

People subscribed via source and target branches

to all changes: