You can set Firefox to automatically clear the cache when Firefox closes:
Select the Privacy & Security panel and go to the History section.