valid_runner.py: implement connection cache