From 385b5d355cd791049f97fc91b8151870d390f51a Mon Sep 17 00:00:00 2001 From: Kornel Date: Sun, 9 Feb 2020 11:50:54 +0000 Subject: [PATCH] Minor storable bug --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4992d91..14a0cf0 100644 --- a/index.js +++ b/index.js @@ -180,9 +180,9 @@ module.exports = class CachePolicy { // contains a max-age response directive, or // contains a s-maxage response directive and the cache is shared, or // contains a public response directive. - this._rescc.public || this._rescc['max-age'] || - this._rescc['s-maxage'] || + (this._isShared && this._rescc['s-maxage']) || + this._rescc.public || // has a status code that is defined as cacheable by default statusCodeCacheableByDefault.indexOf(this._status) !== -1) );