added clear cache function