[Cache] make LockRegistry
use semaphores when possible
#41989
Merged
LockRegistry
use semaphores when possible
#41989