LRU cache for query statements