Memoize the result of async functions for node and component