You can set Firefox to automatically clear the cache when Firefox closes:
At the top of the Firefox window, click on the Firefox button (Tools menu in Windows XP) and then click Options
Select the Privacy panel.
In the History section, set Firefox will: to Use custom settings for history.
Select the check box for Clear history when Firefox closes.
Beside Clear history when Firefox closes, click the Settings... button. The Settings for Clearing History window will open.
In the Settings for Clearing History window, click the check mark box next to Cache.
Click OK to close the Settings for Clearing History window.
Click OK to close the Options window