MCPcopy
hub / github.com/chartbrew/chartbrew / hset

Method hset

server/modules/runtimeCache.js:159–174  ·  view source on GitHub ↗
(key, field, value)

Source from the content-addressed store, hash-verified

157 }
158
159 async hset(key, field, value) {
160 const hash = this.hashes.get(key) || new Map();
161 if (value === undefined) {
162 hash.delete(field);
163 if (hash.size === 0) {
164 this.hashes.delete(key);
165 } else {
166 this.hashes.set(key, hash);
167 }
168 return 1;
169 }
170
171 hash.set(field, value);
172 this.hashes.set(key, hash);
173 return 1;
174 }
175
176 async hdel(key, ...fields) {
177 const hash = this.hashes.get(key);

Callers 5

createMemoryStoreFunction · 0.95
createRedisStoreFunction · 0.95
attachClientFunction · 0.80
setCacheEntryMethod · 0.80

Calls 3

getMethod · 0.45
deleteMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected