Fix bug with cache auto regeneration

Before regenerate the old cache need to delete cached file