title: Oracle OCI Client Cache Not Working
body: <p>I am using Oracle Database 11g Release 11.2.0.2.0 and trying to enable the oci client cache. It isn't working. 
  The configuration changes I made to enable it are -</p>
  
  <ol>
  <li>Enabled the client result set cache by setting the server side parameter 'client_result_cache_size' to 10485760 (10 MB)</li>
  <li>Restarted the oracle instance after setting the above parameter</li>
  <li>Added a table annotation by executing the statement ALTER TABLE emp RESULT_CACHE (MODE FORCE). I verified that the annotation is applied by query the user table later.</li>
  <li>Enabled statement caching on the client side i.e. on the JDBC driver. </li>
  <li>Used prepared statements to execute the query so that statement caching kicks in. From the driver logs I verified that execution of subsequent queries after the first one used the same statement handle.</li>
  </ol>
  
  <p>After executing the select prepared statement query for three times I checked the CLIENT_RESULT_CACHE_STATS$ view. But this view didn't result in any rows.</p>
  
  <p>As part of troubleshooting I even tried adding the /*+ RESULT_CACHE */ hint to the query but the view didn't gave any result. </p>
  
  <p>From the profiler (flextracer) I could see that OCI calls are still made to the server to fetch the result set of the select query. Also on enabling sql trace I could see from tkprof that every execution of the query increased the number of rows fetched on the server which indicates that the client result set caching in OCI isn't working.</p>
  
  <p>Are there any steps which I have missed? </p>
  
  <p>Thanks in advance.</p>