Refresh project cache when active configuration changes

Fix #531.