Prima Assicurazioni Interview Question

Implement a python decorator to cache recursive function results.