ch.py (clear_cache): now do this so that less nodes are visited. Number of nodes visited is unit tested also in test_ch.py.