3 ms·
Ah, I was puzzled by this at first too. What showed me the situation more clearly was clearing the cache _via the class object, not the instance_: >>> fnor
by jepler 5y ago
Ah, I was puzzled by this at first too. What showed me the situation more clearly was clearing the cache _via the class object, not the instance_:
>>> fnord = Fnord()
>>> fnord.square(3) # lru_cache'd
9
>>> del fnord
>>> Fnord.square.cache_clear()
Collected a fnord