Add memoized decorator and memoize get_config function.