I use /*+ result_cache */ in my query to take advantage of the result cache.
so I execute the following scenario:
i) select /*+ result_cache */ value from myTable where id=1; (this returns a result.)
ii) update myTable to set a different value for id=1 record;
iii) run select query again; (this should return a different result. oci result cache gets updated when table changes.)
if I take out
"sqlForValidateConnection" and/or "validateConnectionOnBorrow" (i.e. disable sql validation on borrow), the 2nd query after table update doesn't show the latest result. it's still showing the old query result.
is this a bug? that UCP validation on borrow has an impact on OCI result cache function? this doesn't happen if using dbcp java connection pooling with OCI result cache.