BaseTool: Add cache for the result of SkipAutogen.