Check for $clearCache

Check if Empty Cache was checked, and only clearCache() if true.