Clear cache at shutdown