code: function check(type, hash, callback) {
      if (typeof type !== "string") throw new TypeError("type must be string");
      if (typeof hash !== "string") throw new TypeError("hash must be string");
      if (hasCache[hash]) return callback(null, true);
      local.hasHash(hash, function (err, has) {
        if (err) return callback(err);
        hasCache[hash] = has;
        callback(null, has);
      });
    }
docs: Caching has check.