Flagsmith / flagsmith-dotnet-client

.NET Standard Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
https://www.flagsmith.com/
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Fix cache initialisation that was some kind of circular reference. #81

Closed JFCote closed 8 months ago

JFCote commented 8 months ago

There was no need to initiate the cache right at the beginning. In fact, it was creating a problem trying to call GetLatestFlags on the cache that was currently trying to be initialized for the first time.

JFCote commented 8 months ago

@matthewelwell Here is a tentative fix for a problem on initialization I have using the cache in my code. Let me know if you have any questions.

JFCote commented 8 months ago

@matthewelwell I updated the code and also added a test showing that initializing the cache is now working :)

JFCote commented 8 months ago

@matthewelwell Let me know if anything else is required!

matthewelwell commented 8 months ago

@JFCote fix version is here: https://www.nuget.org/packages/Flagsmith/5.2.1