update cache if new key was written