function shouldCacheResponse(request, response, toggle) {
        let opt = globalOptions;
        let codes = opt.statusCodes;

        if (!response) {
            return false;
        }

        if (toggle && !toggle(request, response)) {
            return false;
        }

        if (codes.exclude && codes.exclude.length && codes.exclude.indexOf(response.statusCode) !== -1) {
            return false;
        }
        if (codes.include && codes.include.length && codes.include.indexOf(response.statusCode) === -1) {
            return false;
        }

        return true;
    }
Returns true if the given request and response should be logged.
@param {Object} request The HTTP request object.
@param {Object} response The HTTP response object.
@param {function(Object, Object):boolean} toggle
@returns {boolean}