server/api/common/cache-topo-graph-converter.js
/**
   * Update target cache file and its timestamp timestamps.
   * @param {string} jsonName - File name of topology data.
   * @private
   */
Update target cache file and its timestamp timestamps.
@param {string} jsonName - File name of topology data.
@private
Update target cache file and its timestamp timestamps . @param { string } jsonName - File name of topology data . @private
async _updateStatsOfTopologyJSON(jsonName) {
    this._jsonPath = `${this._modelDir}/${jsonName}`
    this._cacheJsonPath = `${this._cacheDir}/${jsonName}.cache`
    try {
      this._targetStats = await statFile(this._jsonPath)
    } catch (error) {
      console.error('Error: Cannot stat topology data file: ', this._jsonPath)
      this._targetStats = null
      throw error
    }
    try {
      this._cacheStats = await statFile(this._cacheJsonPath)
    } catch (error) {
      console.warn('Warning: cannot stat cache file: ', this._cacheJsonPath)
      this._cacheStats = null
    }
  }
async _updateStatsOfTopologyJSON ( jsonName ) { this . _jsonPath = ` ${ this . _modelDir } ${ jsonName } ` this . _cacheJsonPath = ` ${ this . _cacheDir } ${ jsonName } ` try { this . _targetStats = await statFile ( this . _jsonPath ) } catch ( error ) { console . error ( 'Error: Cannot stat topology data file: ' , this . _jsonPath ) this . _targetStats = null throw error } try { this . _cacheStats = await statFile ( this . _cacheJsonPath ) } catch ( error ) { console . warn ( 'Warning: cannot stat cache file: ' , this . _cacheJsonPath ) this . _cacheStats = null } }
Update target cache file and its timestamp timestamps.
Update target cache file and its timestamp timestamps .
/**
     * Target topology data file
     * @type {string}
     * @private
     */ /**
     * Target cache file of topology data.
     * @type {string}
     * @private
     */ /**
       * Timestamp of target topology data file.
       * @type {Stats|null}
       * @private
       */ /**
       * Timestamp of cache file.
       * @type {Stats|null}
       * @private
       */