Fix #8047

Ensure that json is returned when only updating the cache and in check mode