Use consistent Cache-Tag format

This commit is contained in:
Michael Jackson 2019-01-01 18:03:54 -08:00
parent 25d86e9c95
commit 99312c75b0
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ function serveJavaScriptModule(req, res) {
'Content-Type': getContentTypeHeader(req.entry.contentType), 'Content-Type': getContentTypeHeader(req.entry.contentType),
'Cache-Control': 'public, max-age=31536000, immutable', // 1 year 'Cache-Control': 'public, max-age=31536000, immutable', // 1 year
ETag: etag(code), ETag: etag(code),
'Cache-Tag': 'file,js-file,js-module' 'Cache-Tag': 'file, js-file, js-module'
}) })
.send(code); .send(code);
} catch (error) { } catch (error) {

View File

@ -18,7 +18,7 @@ function serveStaticFile(req, res) {
'Cache-Control': 'public, max-age=31536000, immutable', // 1 year 'Cache-Control': 'public, max-age=31536000, immutable', // 1 year
'Last-Modified': req.entry.lastModified, 'Last-Modified': req.entry.lastModified,
ETag: etag(req.entry.content), ETag: etag(req.entry.content),
'Cache-Tag': tags.join(',') 'Cache-Tag': tags.join(', ')
}) })
.send(req.entry.content); .send(req.entry.content);
} }

View File

@ -13,7 +13,7 @@ function tagRedirect(req, res) {
res res
.set({ .set({
'Cache-Control': 'public, max-age=60', 'Cache-Control': 'public, max-age=60',
'Cache-Tag': 'redirect,tag-redirect' 'Cache-Tag': 'redirect, tag-redirect'
}) })
.redirect( .redirect(
302, 302,
@ -32,7 +32,7 @@ function semverRedirect(req, res) {
res res
.set({ .set({
'Cache-Control': 'public, max-age=60', 'Cache-Control': 'public, max-age=60',
'Cache-Tag': 'redirect,semver-redirect' 'Cache-Tag': 'redirect, semver-redirect'
}) })
.redirect( .redirect(
302, 302,