strapi-plugin-rest-cache
Version:
Speed-up HTTP requests with LRU cache
23 lines (17 loc) • 312 B
JavaScript
;
function shouldLookup(
ctx,
hitpass // @todo: function or boolean => can be optimized
) {
const type = typeof hitpass;
if (type === 'boolean') {
return !hitpass;
}
if (type === 'function') {
return !hitpass(ctx);
}
return false;
}
module.exports = {
shouldLookup,
};