from functools import cache @cache def expensive_calc(x): return x**2 + 42 print(expensive_calc(10)) # Calculates print(expensive_calc(10)) # Cached
python functool.cache
Creator
Creator
Seonglae ChoCreated
Created
2025 May 28 22:20Editor
Editor
Seonglae ChoEdited
Edited
2025 May 28 22:20Refs
Refs
