Skip to content

Keep a record of the last fetched flags and only emit a new value if it's changed#77

Merged
matthewelwell merged 7 commits intoFlagsmith:mainfrom
foresightmobile:fix/false-positive-realtime-flag-updates
Jul 18, 2025
Merged

Keep a record of the last fetched flags and only emit a new value if it's changed#77
matthewelwell merged 7 commits intoFlagsmith:mainfrom
foresightmobile:fix/false-positive-realtime-flag-updates

Conversation

@gazreese
Copy link
Copy Markdown
Contributor

Fixes #76

Description

Added a local cache of the last fetched data and tested any new data for equality before firing it out to consumers of our flag stream.

Also had a hunch we might not be adding keep-alive headers, but that seems to already be the case.

Regression Test Recommendations

I've tested this manually using the Example app, Flagsmith console and console logging in XCode and it seems to work well.

I've also added a unit test to cover this, and all current tests pass.

Type of Change

  • 🛠️ Bug fix (non-breaking change which fixes an issue)

Comment thread FlagsmithClient/Classes/Flagsmith.swift Outdated
Comment thread FlagsmithClient/Classes/Flagsmith.swift
@matthewelwell matthewelwell merged commit 9f72ec9 into Flagsmith:main Jul 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False-positive realtime flag updates

2 participants