fix(core): update

This commit is contained in:
2021-04-21 19:52:53 +00:00
parent dc5a93b3a2
commit 05997ef1cf
9 changed files with 12214 additions and 1103 deletions

View File

@ -36,7 +36,7 @@ export class CacheManager {
this._cacheMap[identifierArg] = {
timer: new plugins.smarttime.Timer(validForArg),
cachedDeferred: new plugins.smartpromise.Deferred(),
cachedObject: null
cachedObject: null,
};
this._cacheMap[identifierArg].timer.start();
this._cacheMap[identifierArg].timer.completed.then(() => {

View File

@ -5,7 +5,9 @@ export class SmartCache {
private _cacheManager = new CacheManager();
async cacheReturn(asyncCachedFuncArg: () => Promise<any>, cacheDuration: number = 5000) {
const callStack: string = new plugins.smarterror.SmartError('Cache Creation Point').cleanFullStack.split('\n')[2];
const callStack: string = new plugins.smarterror.SmartError(
'Cache Creation Point'
).cleanFullStack.split('\n')[2];
const callHash = plugins.smarthash.sha256FromStringSync(callStack);
// console.log(callHash);