Add query caching ability