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
This commit is contained in:
Andrew Bonney 2024-04-17 08:05:30 +01:00
parent 27078e06e8
commit 52aaea359a
1 changed files with 1 additions and 1 deletions

View File

@ -20,6 +20,6 @@ server {
location / {
root {{ repo_service_home_folder }}/repo/;
autoindex on;
expires 5h;
expires -1;
}
}