Unobtrusive caching for async functions