...
|
...
|
@@ -70,9 +70,17 @@ class SqlHelper { |
|
|
|
|
|
let cacheResult = await this.cache.get(cacheKey);
|
|
|
|
|
|
if (!_.isUndefined(cacheResult) && !_.isNull(cacheResult)) {
|
|
|
this.logger.debug('get success from cache.' + cacheString);
|
|
|
return Promise.resolve(cacheResult);
|
|
|
|
|
|
if (cacheResult) {
|
|
|
try {
|
|
|
cacheResult = JSON.parse(cacheResult);
|
|
|
|
|
|
this.logger.debug('get success from cache.' + cacheString);
|
|
|
|
|
|
return Promise.resolve(cacheResult);
|
|
|
} catch (e) {
|
|
|
this.logger.debug('cache data parse fail.' + JSON.stringify(e));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|