MCPcopy Create free account
hub / github.com/alibaba/GraphScope / clear

Method clear

python/graphscope/nx/classes/cache.py:260–282  ·  view source on GitHub ↗

Clear batch cache and lru cache, reset the status and warmup again

(self)

Source from the content-addressed store, hash-verified

258 self.executor.shutdown(wait=True)
259
260 def clear(self):
261 """Clear batch cache and lru cache, reset the status and warmup again"""
262 if self.enable_iter_cache:
263 self.shutdown()
264 self.enable_iter_cache = False
265 self.iter_gid = 0
266 self.iter_pre_gid = 0
267 self.id2i.clear()
268 self.node_id_cache = ()
269 self.node_attr_cache = ()
270 self.succ_cache = ()
271 self.succ_attr_cache = ()
272 self.pred_cache = ()
273 self.pred_attr_cache = ()
274 self.node_attr_align = self.succ_align = self.succ_attr_align = (
275 self.pred_align
276 ) = self.pred_attr_align = False
277 self.get_node_attr.cache_clear()
278 self.get_successors.cache_clear()
279 self.get_succ_attr.cache_clear()
280 self.get_predecessors.cache_clear()
281 self.get_pred_attr.cache_clear()
282 self.warmup()
283
284 def clear_node_attr_cache(self):
285 """Clear the node attr cache"""

Callers

nothing calls this directly

Calls 3

shutdownMethod · 0.95
warmupMethod · 0.95
clearMethod · 0.65

Tested by

no test coverage detected