private _invalidateSettings()

in src/ems_client.ts [431:490]


  private _invalidateSettings(): void {
    this._cache.clear();
    this._getMainCatalog = _.once(async (): Promise<EmsCatalogManifest> => {
      const services = [];
      if (this._tileApiUrl) {
        const version = this._isRestApi ? LATEST_API_URL_PATH : this._emsVersion;
        services.push({
          type: 'tms',
          manifest: toAbsoluteUrl(this._tileApiUrl, `${version}/manifest`),
        });
      }
      if (this._fileApiUrl) {
        const version = this._isRestApi ? LATEST_API_URL_PATH : this._emsVersion;
        services.push({
          type: 'file',
          manifest: toAbsoluteUrl(this._fileApiUrl, `${version}/manifest`),
        });
      }
      return { services: services };
    });

    this._getDefaultTMSCatalog = _.once(async (): Promise<EmsTmsCatalog> => {
      const catalogue = await this._getMainCatalog();
      const firstService = catalogue.services.find(
        (service: EmsCatalogService) => service.type === 'tms'
      );
      if (!firstService) {
        return { services: [] };
      }
      const url = this._proxyPath + firstService.manifest;
      return await this.getManifest(url);
    });

    this._getDefaultFileCatalog = _.once(async (): Promise<EmsFileCatalog> => {
      const catalogue = await this._getMainCatalog();
      const firstService = catalogue.services.find(
        (service: EmsCatalogService) => service.type === 'file'
      );
      if (!firstService) {
        return { layers: [] };
      }
      const url = this._proxyPath + firstService.manifest;
      return await this.getManifest(url);
    });

    //Cache the actual instances of TMSService as these in turn cache sub-manifests for the style-files
    this._loadTMSServices = _.once(async (): Promise<TMSService[]> => {
      const tmsManifest = await this._getDefaultTMSCatalog();
      return tmsManifest.services.map(
        (serviceConfig: TMSServiceConfig) => new TMSService(serviceConfig, this, this._proxyPath)
      );
    });

    this._loadFileLayers = _.once(async (): Promise<FileLayer[]> => {
      const fileManifest = await this._getDefaultFileCatalog();
      return fileManifest.layers.map(
        (layerConfig: FileLayerConfig) => new FileLayer(layerConfig, this, this._proxyPath)
      );
    });
  }