MCPcopy Index your code
hub / github.com/networkx/networkx / _clear_cache

Function _clear_cache

networkx/utils/misc.py:645–651  ·  view source on GitHub ↗

Clear the cache of a graph (currently stores converted graphs). Caching is controlled via ``nx.config.cache_converted_graphs`` configuration.

(G)

Source from the content-addressed store, hash-verified

643
644
645def _clear_cache(G):
646 """Clear the cache of a graph (currently stores converted graphs).
647
648 Caching is controlled via ``nx.config.cache_converted_graphs`` configuration.
649 """
650 if cache := getattr(G, "__networkx_cache__", None):
651 cache.clear()
652
653
654def check_create_using(create_using, *, directed=None, multigraph=None, default=None):

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…