MCPcopy Index your code
hub / github.com/saltstack/salt / hdel

Method hdel

tests/pytests/unit/cache/test_redis_cache.py:130–137  ·  view source on GitHub ↗
(self, key, field)

Source from the content-addressed store, hash-verified

128 return self.results[-1]
129
130 def hdel(self, key, field):
131 hashmap = self._get_type(key, "hash", {})
132 if not isinstance(field, bytes):
133 field = field.encode("utf8")
134 hashmap["data"].pop(field, None)
135 if len(hashmap["data"]) == 0:
136 self.db.pop(key, None)
137 self.results.append(None)
138
139 def exists(self, key):
140 self.results.append(key in self.db)

Callers 1

_flush_keyFunction · 0.80

Calls 3

_get_typeMethod · 0.95
popMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected