MCPcopy Create free account
hub / github.com/alephdata/aleph / flush

Method flush

aleph/cache.py:66–76  ·  view source on GitHub ↗
(self, prefix=None)

Source from the content-addressed store, hash-verified

64 return self.kv.lock(key, timeout=timeout)
65
66 def flush(self, prefix=None):
67 prefix = prefix or self.prefix
68 keys = []
69 for key in self.kv.scan_iter(match="%s*" % prefix):
70 log.info("Flush: %s", key)
71 keys.append(key)
72 if len(keys) > 0 and len(keys) % 1000 == 0:
73 self.kv.unlink(*keys)
74 keys = []
75 if len(keys) > 0:
76 self.kv.unlink(*keys)

Callers 15

resetcacheFunction · 0.45
clear_rolesMethod · 0.45
load_or_createMethod · 0.45
mergeMethod · 0.45
updateMethod · 0.45
grantMethod · 0.45
updateMethod · 0.45
createMethod · 0.45
profile_fragmentsFunction · 0.45
update_permissionFunction · 0.45
bulk_writeFunction · 0.45
map_to_aggregatorFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_statisticsMethod · 0.36