Fixed Python 3.x issue where the Cache thread wouldn't close so Python couldn't close.