dcl-ops-lib 9.9.0 → 9.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buildStatic.js +7 -3
- package/package.json +1 -1
package/buildStatic.js
CHANGED
|
@@ -97,9 +97,13 @@ function buildStatic(staticSite) {
|
|
|
97
97
|
},
|
|
98
98
|
cachePolicyId: staticSite.cachePolicyId,
|
|
99
99
|
responseHeadersPolicyId: staticSite.responseHeadersPolicyId,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
// Only set the legacy inline TTLs when there is no cache policy. When a
|
|
101
|
+
// cachePolicyId is provided the policy governs TTLs and CloudFront ignores
|
|
102
|
+
// these, so setting them produces a permanent no-op diff (0 => 600 / 0 => aYear)
|
|
103
|
+
// on every preview. Mirrors the forwardedValues handling above.
|
|
104
|
+
minTtl: staticSite.cachePolicyId ? undefined : 0,
|
|
105
|
+
defaultTtl: staticSite.cachePolicyId ? undefined : tenMinutes,
|
|
106
|
+
maxTtl: staticSite.cachePolicyId ? undefined : aYear,
|
|
103
107
|
compress: true,
|
|
104
108
|
},
|
|
105
109
|
// "All" is the most broad distribution, and also the most expensive.
|