Optimization of QueryCache.