from cached import cached


class Double:
    def __init__(self, x):
        self._x = x
    
    @cached("_double_x")
    def value(self):
        return self._x * 2

@@ -59,16 +59,25 @@
 (self, x
+, counter
 ):%0A     
@@ -91,16 +91,48 @@
 ._x = x%0A
+        self._counter = counter%0A
     %0A   
@@ -186,23 +186,241 @@
     
-return self._x * 2
+self._counter += 1%0A        return self._x * 2%0A%0Aif __name__ == %22__main__%22:%0A    c = 0%0A    d = Double(6, c)%0A    %0A    val1 = d.value()%0A    assert val1 == 12%0A    assert c == 1%0A    %0A    val2 = d.value()%0A    assert val2 == 12%0A    assert c == 1
 %0A

Update cached_test.py