memoize call to api