Closed canyavall closed 8 months ago
As long as cacheFlags is enabled, any response immediately sets the cache, there is no condition around this. Setting storage is async but only within <5ms.
I can't see any possibility other than the following
Looking at the code alone I can't see any possiblity of this so replication steps would be very handy. If any of these jump out to you (especially the first if you're identifying and initialising, i.e. doing 2 immediate network requests to Flagsmith)
CC @canyavall, if you get any clues / replication on this please let me know, though I can't see how it's possible considering above
This has been inactive for a while now, please reopen it with the above information if it's still replicable.
We have seen in production and only in some cases the local-storage was keeping an old version of the flags from Flagsmith.
I could not reproduce it at as maybe it happens one out of 1000 times and as soon as we find the issue we request the user to clear the local-storage.
Current Behavior: The local-storage in very specific cases keeps old data from Flagsmith
Expected behavior: Every time Flagsmith success on request the flags, the local-storage is wiped and replaces the flags itself
I'm very sorry I can not provide a repo to tests it, please tell me if I can help somehow