Pretty straightforward question:
Let's say I have a specific query that I know is regularly used, can I tell MySQL to always cache it "automatically" … i.e. once the cached query results are flushed the mysqld
immediately runs that query again to have the cached data ready for the next user?
Or the other way round: can I tell MySQL to not cache specific queries?
What about other caching options, not necessarily related to queries?
I searched through the web on this but can't really find anything related.
Best Answer
MySQL Documentation has SQL_NO_CACHE option:
You can set SQL_NO_CACHE as the default for your session by setting query_cache_type
or
Afterwards, you must say
SELECT SQL_CACHE
to make it cache theSELECT