fix(core): update
This commit is contained in:
@ -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(() => {
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user