Ensuring indexes for cache.