added clear caches func