Prima Assicurazioni interview question

D: Write a python decorator to cache recursive function results.