Fix profile not working in sql_cache enabled. It will thrown NullPointerException. The reason is that the Coordinator in init profile is null when cache is enable. Therefore, we should perform different profile processing in the case of cache hits and misses, so as to avoid the situation of null pointers. Fixed #7104