Let's assume that I want work with query cache enabled. For example let's set it to 128mb value but my working enviorment is very random and dynamic, so cache is full in 1 minute after setting it.
When checking
SHOW STATUS LIKE "qcache%";
Qcache_lowmem_prunes value is growing dangerously high because of high ammount of random queries.
So let's go the point of this question: How to cache only that queries that are taking longer then ie: 1 sec?
Is it even possible with query cache enabled or is it better to turn it off for good in such dynamic enviorment? Are there any different aproaches to cache those long queries?
Let's assume that 1 second for query is achieved due to low budget hardware, not from bad query construction.