You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see how this could be useful, but I don't think that it should be added to FWF as a feature. This is because of a few reasons:
FWF aims to be simple, and do one thing well.
Adding a usage-tracking system and increment some counter (writing data somewhere) every time a flag is queried is going to have a performance overhead. This needs to be understood before adding something of this sort. I wonder if this could be done in-memory, without counter persistence (therefore, with less overhead), but then the usage tracking would become unreliable.
This is something that can be easily added in application code with a wrapper for FWF, and even released as an extension on Hex. For example, your application could use a facade module that wraps FWF and its enabled? function, increments the counter with each call, and then runs some sweeper GenServer that periodically deletes stale flags.
keep track of uses of a given flag using simple metric system + automatically delete/remove flags that haven't been referenced after a stale interval
The text was updated successfully, but these errors were encountered: