The StatementCache interceptor does not cache calls to Connection#prepareStatement(String, String[]) and most likely Connection#prepareStatement(String, int[]) The reason is CacheKey#equals and #hashCode, that use Array#equals resp. #hashCode when processing the args array, which does not work correctly as the args array contains a nested array in this case. Switching to Arrays#deepEquals resp. #deepHashCode fixes the issue. We need to use the StatementCache together with Spring, as Springs JdbcTemplate creates a new statement for each call and Oracle looks up the type of the return values for each created statement, which got dramatically slower with Oracle 18.
Just for clarification, as the description might be a bit misleading: The results get added to the internal map, but cannot be retrieved anymore due to the broken CacheKey implementation.
Thanks for the report. The fix will be in : - 9.0.x for 9.0.18 onwards - 8.5.x for 8.5.40 onwards - 7.0.x for 7.0.94 onwards