Added function cache macro (memoization)