| 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: |
no outgoing calls