Make `Cache` able to cache function return values