MySQL 5.7 Reference Manual Including MySQL NDB Cluster 7.5 and NDB Cluster 7.6
The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.
Two query cache-related options may be specified in
SELECT
statements:
The query result is cached if it is cacheable and the
value of the
query_cache_type
system
variable is ON
or
DEMAND
.
SQL_NO_CACHE
The server does not use the query cache. It neither checks the query cache to see whether the result is already cached, nor does it cache the query result.
Examples:
SELECT SQL_CACHE id, name FROM customer; SELECT SQL_NO_CACHE id, name FROM customer;