Commit d53a469f authored by Anne Blankert's avatar Anne Blankert

remove logging

parent b2181b39
...@@ -25,8 +25,6 @@ module.exports = class DirCache { ...@@ -25,8 +25,6 @@ module.exports = class DirCache {
setCachedFile(dir, key, data) { setCachedFile(dir, key, data) {
const dirName = path.join(this.cacheRoot, dir); const dirName = path.join(this.cacheRoot, dir);
const filePath = path.join(dirName, key); const filePath = path.join(dirName, key);
console.log(`cache dirname: ${dirName}`);
console.log(`filePath: ${filePath}`);
fs.mkdirSync(dirName, {recursive: true}); fs.mkdirSync(dirName, {recursive: true});
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
fs.writeFile(filePath, data, (err) => { fs.writeFile(filePath, data, (err) => {
...@@ -55,7 +53,7 @@ function cacheDirName(params) { ...@@ -55,7 +53,7 @@ function cacheDirName(params) {
const dirname = cacheDirName(params); const dirname = cacheDirName(params);
const filename = cacheFileName(query); const filename = cacheFileName(query);
console.log(`getCache: ${dirname}`); //console.log(`getCache: ${dirname}`);
return fsPromises.readFile(`${dirname}/${filename}`) return fsPromises.readFile(`${dirname}/${filename}`)
.then(data=>data) .then(data=>data)
.catch(error=>null); .catch(error=>null);
...@@ -65,7 +63,7 @@ function cacheDirName(params) { ...@@ -65,7 +63,7 @@ function cacheDirName(params) {
const dirname = cacheDirName(params); const dirname = cacheDirName(params);
const filename = cacheFileName(query); const filename = cacheFileName(query);
console.log(`setCache: ${dirname}`); //console.log(`setCache: ${dirname}`);
return fsPromises.writeFile(`${dirname}/${filename}`, data) return fsPromises.writeFile(`${dirname}/${filename}`, data)
.then(() => {return}) .then(() => {return})
.catch(err=>err); .catch(err=>err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment