@ethlete/query 2.1.0 → 2.1.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.
|
@@ -163,6 +163,9 @@ const extractExpiresInSeconds = (headers) => {
|
|
|
163
163
|
const ageSeconds = parseInt(age);
|
|
164
164
|
expiresIn = maxAge - ageSeconds;
|
|
165
165
|
}
|
|
166
|
+
else if (maxAge) {
|
|
167
|
+
expiresIn = maxAge / 2; // We assume the response is half way to its expiration
|
|
168
|
+
}
|
|
166
169
|
else if (expires) {
|
|
167
170
|
// Used by some apis to tell the response will never expire
|
|
168
171
|
// In this case we let the response expire after 1 hour
|