server/api/common/cache-topo-graph-converter.js
/**
   * Write converted topology data to cache file.
   * @param {string} jsonString - Converted topology data as json string.
   * @private
   */
Write converted topology data to cache file.
@param {string} jsonString - Converted topology data as json string.
@private
Write converted topology data to cache file . @param { string } jsonString - Converted topology data as json string . @private
_writeCache(jsonString) {
    console.log('create cache: ', this._cacheJsonPath)
    fs.writeFile(this._cacheJsonPath, jsonString, 'utf8', (error) => {
      if (error) {
        console.error('Error: cannot write cache file: ', this._cacheJsonPath)
        throw error
      }
      console.log(`cache saved: ${this._cacheJsonPath}`)
    })
  }
_writeCache ( jsonString ) { console . log ( 'create cache: ' , this . _cacheJsonPath ) fs . writeFile ( this . _cacheJsonPath , jsonString , 'utf8' , ( error ) => { if ( error ) { console . error ( 'Error: cannot write cache file: ' , this . _cacheJsonPath ) throw error } console . log ( ` ${ this . _cacheJsonPath } ` ) } ) }
Write converted topology data to cache file.
Write converted topology data to cache file .