Set CacheIgnoreCacheControl on pypi proxy cache

Newer pip sets cache-control: max-age=0 on requests for pypi indexes.
This tells the proxy cache not to serve the index content from the
cache. Unfortauntely this then means we fail to get this data which
could be cached if we can't talk to the backend for some reason.

By default pypi seems to set a 600 second max-age on these indexes which
should be far better than not caching at all. So set the config to have
apache ignore client side max-age and other cache disabling directives.

Change-Id: I2da7006dcd8a8f4212f5e766ef35ba7b98177ed0
This commit is contained in:
Clark Boylan 2018-12-13 12:30:43 -08:00
parent 2cfe6061a8
commit 130c0a47fc

View File

@ -53,6 +53,12 @@ LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-a
# 5GiB
CacheMaxFileSize 5368709120
CacheStoreExpired On
# Pip sets Cache-Control: max-age=0 on requests for pypi index pages.
# This means we don't use the cache for those requests. This setting
# should force the proxy to ignore cache-control on the request side
# but we should still cache things based on the cache-control responses
# from the backed servers.
CacheIgnoreCacheControl On
# Added Aug 2017 in an attempt to avoid occasional 502 errors (around
# 0.05% of requests) of the type: