I've tried to set this by using SET VARIABLE but it said that have_query_cache is read-only
mysql>SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| have_query_cache | YES |
+------------------+-------+
have_query_cacheis deprecated, always has a value ofNO, and you should expect it to be removed in a future MySQL release. MySQL 8.0 Reference Manual / ... / Server System Variables