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 15 forks source link

Add caching #77

Closed JFCote closed 11 months ago

JFCote commented 1 year ago

This is a tentative to handle caching.

Since Flagsmith now works with a list of flag instead of "flag by flag", normal cache are not working for this scenario. I have created simple cache classes that handle if the data is stale or not.

I did my best with the identity and traits but its gets pretty complicated with caching.

Please let me know what is missing and I'll try to provide everything for a quick merge because we need this feature :)

JFCote commented 1 year ago

@dabeeeenster Please let me know if something is missing.

dabeeeenster commented 1 year ago

cc @matthewelwell for review

JFCote commented 12 months ago

Can you guys consider adding the "hacktoberfest" to the project label? This will allow this pr to count towards my goal of 4 pr during the month of October if it's merged before October 31th.

But if you don't, that's OK too, it's just a bonus if you do! Thanks!!

dabeeeenster commented 12 months ago

Done!

JFCote commented 11 months ago

@dabeeeenster @matthewelwell any news when you'll be able to review this? I have time this week to collaborate and add stuff if required but after that I will not. Thanks!

matthewelwell commented 11 months ago

Hey @JFCote, apologies, I've just got back from some time off - I will take a look this week.

JFCote commented 11 months ago

@matthewelwell Updated the problem your found. Let me know if there is anything else!

JFCote commented 11 months ago

@matthewelwell @vpetrusevici Please let me know if any changes are required. Our company is a paying customer for Flagsmith, working mainly in C# and .NET and this caching is very important for us to continue our project. I'm available to update / add anything that is required to merge this quickly. Thanks!

matthewelwell commented 11 months ago

@JFCote I've responded to / resolved all your comments and approved the PR. Let me know if there is any reason not to merge and release.

JFCote commented 11 months ago

@matthewelwell I see no reason to prevent the merge and the release. I will be able to test it in real scenario and come back with tweaks, bug fixes, etc.. I tend to be a little bit more active in this project in the future, if that is ok with you guys at Flagsmith :) Have a wonderful day and let me know once it's released!