cache handling moved from analyzer to visitor.