Make locking simpler

add test for node existence cache behavior