We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79788db commit 263691eCopy full SHA for 263691e
packages/compass-web/scripts/upload.mts
@@ -54,6 +54,8 @@ const s3Client = new S3({
54
credentials: getCredentials(),
55
});
56
57
+const CACHE_MAX_AGE = 5 * 1000 * 60; // 5mins
58
+
59
for (const file of artifacts) {
60
const filePath = path.join(DIST_DIR, file);
61
// NB: important that upload root directory is always `compass/`
@@ -83,6 +85,7 @@ for (const file of artifacts) {
83
85
ContentType: contentTypeForExt[path.extname(file)],
84
86
ContentEncoding: 'br',
87
ContentLength: compressedFileContent.byteLength,
88
+ CacheControl: `public, max-age=${CACHE_MAX_AGE}, must-revalidate`,
89
90
91
console.log('Successfully uploaded %s (ETag: %s)', file, res.ETag);
0 commit comments