MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / CountingCache

Class CountingCache

tests/test_detect.py:1919–1922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1917 # cache exactly once per computed target (and reads short-circuit before
1918 # any write), one write == one evaluation of that path.
1919 class CountingCache(dict):
1920 def __setitem__(self, key, value):
1921 eval_counts[key] = eval_counts.get(key, 0) + 1
1922 super().__setitem__(key, value)
1923
1924 cache = CountingCache()
1925 for f in files:

Calls

no outgoing calls