Clear cache before changing the realm configuration