summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2023-10-11 18:13:57 -0600
committerGitHub <noreply@github.com>2023-10-11 18:13:57 -0600
commitd9cb1a107017ef543cd951283d36aef0c2a3ff28 (patch)
tree49da486bbd3955ef2137afb7b336404025a60326
parent01747b50dfc4ffe19950ea8bcf1e1697bb0a49cd (diff)
downloadspack-d9cb1a107017ef543cd951283d36aef0c2a3ff28.tar.gz
spack-d9cb1a107017ef543cd951283d36aef0c2a3ff28.tar.bz2
spack-d9cb1a107017ef543cd951283d36aef0c2a3ff28.tar.xz
spack-d9cb1a107017ef543cd951283d36aef0c2a3ff28.zip
buildcache: Tell servers not to cache index or hash (#40339)
-rw-r--r--lib/spack/spack/binary_distribution.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index a9b1d6280b..5559e89820 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -913,7 +913,7 @@ def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_di
index_json_path,
url_util.join(cache_prefix, "index.json"),
keep_original=False,
- extra_args={"ContentType": "application/json"},
+ extra_args={"ContentType": "application/json", "CacheControl": "no-cache"},
)
# Push the hash
@@ -921,7 +921,7 @@ def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_di
index_hash_path,
url_util.join(cache_prefix, "index.json.hash"),
keep_original=False,
- extra_args={"ContentType": "text/plain"},
+ extra_args={"ContentType": "text/plain", "CacheControl": "no-cache"},
)