Removing cache

This commit is contained in:
Matias committed 2019-07-01 16:30:12 -03:00
1 parent 1626ac582a
commit 8153e68b09
1 file changed
-8
-8
View File
@@ -36,7 +36,6 @@ let isHttpServerStarted = false
const FILE_CLOUD = require('./Server/FileCloud')
let fileCloud = FILE_CLOUD.newFileCloud()
let storageData = new Map()
startHtttpServer()
@@ -379,12 +378,6 @@ function respondWithSourceCode (requestParameters, response) {
let filePath = devTeam + '/plotters/' + codeName + '/' + moduleName
let cachedSourceCode = storageData.get(filePath)
if (cachedSourceCode) {
respondWithContent(cachedSourceCode, response)
return
}
fileCloud.getBlobToText(devTeam.toLowerCase(), filePath, null, onDataArrived)
function onDataArrived (err, pData) {
@@ -392,7 +385,6 @@ function respondWithSourceCode (requestParameters, response) {
console.log('[ERROR] server -> onBrowserRequest -> respondWithSourceCode -> Could not read a file -> err.message = ' + err.message, err.stack)
pData = ''
}
storageData.set(filePath, pData)
respondWithContent(pData, response)
}
}