(key: string, field: string, value: any)
| 66 | } |
| 67 | |
| 68 | async hSet(key: string, field: string, value: any) { |
| 69 | try { |
| 70 | const json = JSON.stringify(value, BufferJSON.replacer); |
| 71 | |
| 72 | let hash = LocalCache.localCache.get(this.buildKey(key)); |
| 73 | |
| 74 | if (!hash) { |
| 75 | hash = {}; |
| 76 | } |
| 77 | |
| 78 | hash[field] = json; |
| 79 | LocalCache.localCache.set(this.buildKey(key), hash); |
| 80 | } catch (error) { |
| 81 | this.logger.error(error); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | async hDelete(key: string, field: string) { |
| 86 | try { |