Closed maelgrove closed 5 years ago
I'm not quite sure how it's going to work. In case of files on disk monitoring for changes is relatively straightforward i.e. FileSystemMonitor exists on all OSes, however even that is hard to make to work reliably. Monitoring something like Azure Key Vault involves scanning it in background. Or when config is initialised by file content it's just impossible. I needs it needs more thought.
It would be nice to be notified about a change in the configuration through external components, e.g. if a user manually modifies a configuration file during runtime. aspnet/Configuration offers this feature using a custom change token based on a
CancellationToken
which is being replaced atomically after each change, but any other implementation would suffice (e.g. events). This would also replace the need to have a configuration value cache in some ways.