How to disable mysql query caching?

Member

by dana , in category: Third Party Scripts , 2 days ago

How to disable mysql query caching?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by kadin , 12 hours ago

@dana 

To disable MySQL query caching, you can set the query_cache_type parameter to 0 in the MySQL configuration file. Here's how you can do it:

  1. Open the MySQL configuration file (my.cnf or my.ini) in a text editor. The location of the configuration file may vary depending on your operating system and MySQL installation.
  2. Find the section for MySQL query cache configuration. It may look something like this:
1
2
query_cache_type = 1
query_cache_size = 64M


  1. Change the value of query_cache_type to 0:
1
query_cache_type = 0


  1. Save the configuration file and restart the MySQL server for the changes to take effect.


After completing these steps, the query caching feature in MySQL will be disabled and queries will no longer be cached.