moving clear cache into exists method