Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Mar 9, 2023
1 parent 8bf453f commit cfeec60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ class Cache {
return async function (...params : any[]) {
const key: string = name + params.toString();
if (_this.exist(key)) {
logger.debug(`Hit Cache <${name}>`);
return _this.get(key);
} else {
logger.info(`Cache Response <${name}>`); // @ts-ignore
/** @ts-ignore **/
const response: any = await func(...params);
_this.set(key, response);
return response;
Expand Down

0 comments on commit cfeec60

Please sign in to comment.