We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f01d46 commit 3d6a5bbCopy full SHA for 3d6a5bb
index.js
@@ -472,7 +472,8 @@ module.exports = class CachePolicy {
472
}
473
474
useStaleWhileRevalidate() {
475
- return this.maxAge() + toNumberOrZero(this._rescc['stale-while-revalidate']) > this.age();
+ const swr = toNumberOrZero(this._rescc['stale-while-revalidate']);
476
+ return swr > 0 && this.maxAge() + swr > this.age();
477
478
479
static fromObject(obj) {
0 commit comments