Prima Assicurazioni Interview Question

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