Caching for the query to render the index