I'm curious about best practices here.
Currently, I save all the feature flags (https://en.wikipedia.org/wiki/Feature_toggle) in the database. When I have to show some feature, I read the status (True/False) from it and then show/hide it depending on the value. There are a ton of these feature flags in my application and I'm constantly pinging the database throughout application.
Is there a better way? Saving it in database, but loading in cache (memory?) and reading from it? Updating that cache when something changes?
edit: Turning on/off is happening on the server side. Server then sync those changes to the application which is then saving it to the database.
Also, some pros/cons and memory impact of these options would be nice. Didn't find anything similar on the web.