Added debug flag to clear cache