MCPcopy
hub / github.com/chartbrew/chartbrew / hdel

Method hdel

server/modules/runtimeCache.js:176–192  ·  view source on GitHub ↗
(key, ...fields)

Source from the content-addressed store, hash-verified

174 }
175
176 async hdel(key, ...fields) {
177 const hash = this.hashes.get(key);
178 if (!hash) return 0;
179
180 let removedCount = 0;
181 fields.forEach((field) => {
182 if (hash.delete(field)) {
183 removedCount += 1;
184 }
185 });
186
187 if (hash.size === 0) {
188 this.hashes.delete(key);
189 }
190
191 return removedCount;
192 }
193
194 async hget(key, field) {
195 const hash = this.hashes.get(key);

Callers 4

createMemoryStoreFunction · 0.95
createRedisStoreFunction · 0.95
attachClientFunction · 0.80

Calls 2

getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected