Bug #40137 REQ: allow limiting query cache for certain tables
Submitted: 19 Oct 2008 8:29 Modified: 7 Jul 2017 9:44
Reporter: Amir Wald Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Query Cache Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: query cache, tables, tables limit

[19 Oct 2008 8:29] Amir Wald
Description:
Currently, the query cache can be configured on a global or per query basis.

In a common scenario where some tables on the db are frequently updated (thus bad for query cache) and others are seldom updated (perfect for query cache), it's going to be much easier if query cache get be configured to never try to cache queries including the frequently updated tables. Also, it could be made to prefer preserving queries including seldom-updated tables.

How to repeat:
This is a feature request.

Suggested fix:
Allow specifying, per table, which tables are "always excluded" / "preferably included" / "normal" for the query cache.

Any query containing "always excluded" will never be inserted to the query cache.

Query having only "preferably included" tables will have a higher priority to stay in the cache.
[4 Nov 2009 7:54] Valeriy Kravchuk
Thank you for the feature request.
[7 Jul 2017 9:44] Erlend Dahl
MySQL will no longer invest in the query cache, see:

http://mysqlserverteam.com/mysql-8-0-retiring-support-for-the-query-cache/