Added clearCache() function.