HubSpot interview question

Memoize function calls and store results in cache object to access later.