DEV Community

Discussion on: Learn to use and manage feature flags in .NET Core, locally and with Azure

Collapse
 
mattcobley profile image
Matt Cobley

Why is it that we have to stop and re-start the app when disabling the feature flag in Azure? Isn't the point that you can just change it? If the app was deployed to Azure would you need to restart the app?

Collapse
 
softchris profile image
Chris Noring

hi Matt. You don't have to stop/start. There's a configuration you can do so that it reads new values on the feature flag at a set interval. Here's the instruction for that:

var env = hostingContext.HostingEnvironment.EnvironmentName;
          config.AddAzureAppConfiguration(options =>
                  options.Connect(connection).UseFeatureFlags(opt =>
                  {
                    opt.Label = env;
                    opt.CacheExpirationInterval = TimeSpan.FromSeconds(5);
                  }));
Enter fullscreen mode Exit fullscreen mode