Memoize in controller