Optimize compare workflow and clean cache files
