From d1d9e5ab30e05f1b3b30c51da79428f7b38d1e87 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 9 Feb 2017 14:37:36 -0500 Subject: [PATCH 1/2] Change cache to 4h --- website/scripts/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/scripts/deploy.sh b/website/scripts/deploy.sh index a52a0034920..cc896c578f3 100755 --- a/website/scripts/deploy.sh +++ b/website/scripts/deploy.sh @@ -55,7 +55,7 @@ if [ -z "$NO_UPLOAD" ]; then --no-mime-magic \ --acl-public \ --recursive \ - --add-header="Cache-Control: max-age=31536000" \ + --add-header="Cache-Control: max-age=14400" \ --add-header="x-amz-meta-surrogate-key: site-$PROJECT" \ sync "$DIR/build/" "s3://hc-sites/$PROJECT/latest/" From a10a0a40f602e7a07c248787d65386d6b883d5ca Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 9 Feb 2017 14:38:46 -0500 Subject: [PATCH 2/2] Cache assets longer --- website/scripts/deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/scripts/deploy.sh b/website/scripts/deploy.sh index cc896c578f3..1248983eaf5 100755 --- a/website/scripts/deploy.sh +++ b/website/scripts/deploy.sh @@ -64,6 +64,7 @@ if [ -z "$NO_UPLOAD" ]; then echo "Overriding javascript mime-types..." s3cmd \ --mime-type="application/javascript" \ + --add-header="Cache-Control: max-age=31536000" \ --exclude "*" \ --include "*.js" \ --recursive \ @@ -72,6 +73,7 @@ if [ -z "$NO_UPLOAD" ]; then echo "Overriding css mime-types..." s3cmd \ --mime-type="text/css" \ + --add-header="Cache-Control: max-age=31536000" \ --exclude "*" \ --include "*.css" \ --recursive \ @@ -80,6 +82,7 @@ if [ -z "$NO_UPLOAD" ]; then echo "Overriding svg mime-types..." s3cmd \ --mime-type="image/svg+xml" \ + --add-header="Cache-Control: max-age=31536000" \ --exclude "*" \ --include "*.svg" \ --recursive \