Enable MySQL Query Caching

You can setup them in /etc/my.cnf (CentOS 7)

vi /etc/my.cnf

Append config directives as follows:

query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576

In above example the maximum size of individual query results that can be cached set to 1048576 using query_cache_limit system variable. Memory size in Kb.

Restart the mysql service.

service mysqld restart

Leave a Reply

Your email address will not be published. Required fields are marked *