In the Settings for Clearing History window, put a check mark next to Cache.The Settings for Clearing History window will open. Beside Clear history when Firefox closes, click the Settings… button.
Select the Privacy & Security panel and go to the History section. Click the menu button and select Settings. Click the menu button and select Options Preferences. In the Menu bar at the top of the screen, click Firefox and select Preferences. You can set Firefox to automatically clear the cache when Firefox closes: (If you don't see it, click the menu button, then click Library click the menu button.)
Tip: Here's another way to clear the Firefox cache: