code: function (cache, listener) {
      if (Object.keys(cache).length <= 0) {
          listener.forEach(function (callback) {
              try {
                  callback();
              } catch (ex) {
                  console.error(ex.stack);
              }
          });
      }
  }
docs: check event trigger