Corrected the caching logic by returning the actual output and passing in the full input.