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 823e18b commit 5ee7074Copy full SHA for 5ee7074
index.js
@@ -89,7 +89,7 @@ const middleware = (opts) => async (req, res, next) => {
89
return acc
90
}, [])
91
// delete keys on all cache tiers
92
- patterns.forEach(pattern => opts.stores.forEach(store => getKeys(store, pattern).then(keys => mcache.del(keys))))
+ patterns.forEach(pattern => opts.stores.forEach(store => getKeys(store, pattern).then(keys => keys.length > 0 ? mcache.del(keys) : null)))
93
} else if (payload.headers[X_CACHE_TIMEOUT] || payload.headers[CACHE_CONTROL]) {
94
// extract cache ttl
95
let ttl = 0
0 commit comments