Fixed bug which caused gc to kill the entire cache