Checking and rebuilding the cache now happens in two ways