2. Now, open MySQL prompt and run this command:
mysql> SHOW VARIABLES LIKE '%query_cache%';
This will give a tabular result like:
---------------------------------------------
| Variable_name | Value |
---------------------------------------------
| have_query_cache | YES |
| query_cache_limit | 2097152 |
| query_cache_min_res_unit | 8192 |
| query_cache_size | 268435456 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
---------------------------------------------
6 rows in set (0.01 sec)
query_cache_type will be set to ON or OFF as required.