Made link cache more robust to corrupt cache file.