Skip to content

Commit 01e8753

Browse files
committed
k
1 parent 9f13f3e commit 01e8753

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ufl/corealg/dag_visitor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class DAGVisitor(ABC):
1111

1212
def __init__(self) -> None:
1313
"""Initialise."""
14-
self.cache = {}
14+
self._cache = {}
1515

1616
def __call__(self, node: Expr, *args) -> Expr:
1717
"""Perform memoised DAG traversal with ``process`` singledispatch method.
@@ -26,10 +26,10 @@ def __call__(self, node: Expr, *args) -> Expr:
2626
"""
2727
cache_key = (node, *args)
2828
try:
29-
return self.cache[cache_key]
29+
return self._cache[cache_key]
3030
except KeyError:
3131
result = self.process(node, *args)
32-
self.cache[cache_key] = result
32+
self._cache[cache_key] = result
3333
return result
3434

3535
@singledispatchmethod

0 commit comments

Comments
 (0)