Option Description
0 or OFF Do not cache results in or retrieve results from the query cache. Note that
this does not deallocate the query cache buffer. To do that, you should set
query_cache_size to 0.
1 or ON Cache all cacheable query results except for those that begin with SELECT
SQL_NO_CACHE.
2 or DEMAND Cache results only for cacheable queries that begin with SELECT SQL_CACHE.
如果设为0 则不从缓存区取出数据。
如果设为1 除了指定 SELECT SQL_NO_CACHE
如果设为2 指定SELECT SQL_CACHE 才能从缓存去中取出数据。