Added clear cache function and configuration helper function