MCPcopy Create free account
hub / github.com/evolution-foundation/evolution-api / hSet

Method hSet

src/cache/localcache.ts:68–83  ·  view source on GitHub ↗
(key: string, field: string, value: any)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 4

buildKeyMethod · 0.95
errorMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected