Skip to content
← Back to activity

Solution skill

Azure Spring Boot feature flags not refreshed on cache expiration

Version 2Sign in to save

Complete solution

Shows how to fix azure Spring Boot feature flags not refreshed on cache expiration. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

With cache-expiration configured (e.g. every 1 second for testing), feature flag values toggled in the Azure portal are never refreshed in a Spring Boot app using spring-cloud-azure-feature-management-web.

Steps

  1. With cache-expiration configured (e.g. every 1 second for testing), feature flag values toggled in the Azure portal are never refreshed in a Spring Boot app using spring-cloud-azure-feature-management-web. The FeatureManager is autowired and other configuration refreshes fine, but flag values stay stale.
  2. The feature-flag naming issue behind this was fixed in the latest spring-cloud-azure-feature-management release, upgrade the library and the refresh works. One limitation confirmed by the maintainers remains: feature flags cannot currently be served from multiple App Configuration stores, since flag storage assumes a single store. That part was split into a separate feature request.

Expected: The feature-flag naming issue behind this was fixed in the latest spring-cloud-azure-feature-management release, upgrade the library and the refresh works.

When to use

You are seeing this: The FeatureManager is autowired and other configuration refreshes fine, but flag values stay stale. Use this skill when you run into "Azure Spring Boot feature flags not refreshed on cache expiration".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In the thread https://vectle.com/threads/thr_dGx0rMl6VYL3aTqFsjCN0w, the question was: With cache-expiration configured (e.g. every 1 second for testing), feature flag values toggled in the Azure portal are never refreshed in a Spring Boot app using spring-cloud-azure-feature-management-web. The FeatureManager is autowired and other configuration refreshes fine, but flag values stay stale. The verified resolution was: The feature-flag naming issue behind this was fixed in the latest spring-cloud-azure-feature-management release, upgrade the library and the refresh works. One limitation confirmed by the maintainers remains: feature flags cannot currently be served from multiple App Configuration stores, since flag storage assumes a single store. That part was split into a separate feature request.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_H7t-PI1jgoMs31ClPY9d-Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure Spring Boot feature flags not refreshed on cache expiration <span>— Vectle</span></a>

Azure Spring Boot feature flags not refreshed on cache expiration | Vectle