telefonicaid / fiware-cosmos

fiware-cosmos toolkit for administration and support. Includes Sahara plugin
GNU Affero General Public License v3.0
11 stars 15 forks source link

[cosmos-proxy] The proxy does not properly read the cache #192

Closed frbattid closed 8 years ago

frbattid commented 8 years ago

cache.js is returning the read cache, but the function invoking it is not saving the returned value anywhere (which is OK for me). The problem is the cache must internally assign the read cache to the var cache, not returning it:

function loadCacheData() {
    cache = JSON.parse(fs.readFileSync(pathToFile, 'utf8'));
} // loadCacheData

Instead of current:

function loadCacheData() {
    return JSON.parse(fs.readFileSync(pathToFile, 'utf8'));
} // loadCacheData
pcoello25 commented 8 years ago

Implemented in PR #195