T358346 introduces the ObjectCacheFactory service to MediaWiki core, replacing several static ObjectCache methods that are now deprecated; we should migrate to that service.
While we’re at it, I think we can also resolve three or four cache-related subtasks of T277464: [EPIC] Multiple Wikibase service wiring tests fail when run as unit tests: T281706, T281708, and T281710 (all using getLocalServerInstance()), as well as T281709 (using ObjectCache::getInstance( $cacheType )).