From 52aaea359aa8d14d1589f57035027a59eaba237f Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Wed, 17 Apr 2024 08:05:30 +0100 Subject: [PATCH] Set 'Cache-Control: no-cache' in repo server response headers Currently, when the repo server stores files like OpenStack's upper-constraints.txt, the cache settings cause pip to cache this file. When updating this file or experimenting with different constraints, this cache can cause unexpected results as pip may deploy different versions to those currently specified in the file. This change instructs pip or other clients not to cache responses, and matches the OpenDev origin's response headers for requirements files. Similar issues could apply for wheels and similar if experimental changes are made without adjusting version numbers. Change-Id: I7fdb62f79590deb118ecac2aac71984bd32685f1 --- templates/openstack-slushee.vhost.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/openstack-slushee.vhost.j2 b/templates/openstack-slushee.vhost.j2 index 8e32e62..b4850cf 100644 --- a/templates/openstack-slushee.vhost.j2 +++ b/templates/openstack-slushee.vhost.j2 @@ -20,6 +20,6 @@ server { location / { root {{ repo_service_home_folder }}/repo/; autoindex on; - expires 5h; + expires -1; } }