Fixed clearCache. closes #459.