Cache static assets longer
This commit is contained in:
parent
8c311daa72
commit
c80e6671e2
|
@ -64,6 +64,7 @@ if [ -z "$NO_UPLOAD" ]; then
|
||||||
echo "Overriding javascript mime-types..."
|
echo "Overriding javascript mime-types..."
|
||||||
s3cmd \
|
s3cmd \
|
||||||
--mime-type="application/javascript" \
|
--mime-type="application/javascript" \
|
||||||
|
--add-header="Cache-Control: max-age=31536000" \
|
||||||
--exclude "*" \
|
--exclude "*" \
|
||||||
--include "*.js" \
|
--include "*.js" \
|
||||||
--recursive \
|
--recursive \
|
||||||
|
@ -72,6 +73,7 @@ if [ -z "$NO_UPLOAD" ]; then
|
||||||
echo "Overriding css mime-types..."
|
echo "Overriding css mime-types..."
|
||||||
s3cmd \
|
s3cmd \
|
||||||
--mime-type="text/css" \
|
--mime-type="text/css" \
|
||||||
|
--add-header="Cache-Control: max-age=31536000" \
|
||||||
--exclude "*" \
|
--exclude "*" \
|
||||||
--include "*.css" \
|
--include "*.css" \
|
||||||
--recursive \
|
--recursive \
|
||||||
|
@ -80,12 +82,12 @@ if [ -z "$NO_UPLOAD" ]; then
|
||||||
echo "Overriding svg mime-types..."
|
echo "Overriding svg mime-types..."
|
||||||
s3cmd \
|
s3cmd \
|
||||||
--mime-type="image/svg+xml" \
|
--mime-type="image/svg+xml" \
|
||||||
|
--add-header="Cache-Control: max-age=31536000" \
|
||||||
--exclude "*" \
|
--exclude "*" \
|
||||||
--include "*.svg" \
|
--include "*.svg" \
|
||||||
--recursive \
|
--recursive \
|
||||||
modify "s3://hc-sites/$PROJECT/latest/"
|
modify "s3://hc-sites/$PROJECT/latest/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Perform a soft-purge of the surrogate key.
|
# Perform a soft-purge of the surrogate key.
|
||||||
if [ -z "$NO_PURGE" ]; then
|
if [ -z "$NO_PURGE" ]; then
|
||||||
echo "Purging Fastly cache..."
|
echo "Purging Fastly cache..."
|
||||||
|
|
Loading…
Reference in New Issue