Uber Interview Question

Front end question. Create a cache so that API won't called twice if the API is already present in the cache.