Below are my Query cache settings,
mysql> show variables Like '%query_cache%';
+------------------------------+---------+
| Variable_name | Value |
+------------------------------+---------+
| have_query_cache | YES |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 8388608 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+---------+
6 rows in set (0.01 sec)
when I execute queries from MySQL command prompt the caching is working and results are coming very fast. But for the same query from application its not working. Can you please advice me to resolve this issue. Im using Java with Tomcat server