Simple memoization for Objective-C methods.