Actual caching stuff that is split out
Ensuring indexes for cache.