Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IOptionsMonitor to hot reload config #872

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Use IOptionsMonitor to hot reload config #872

merged 1 commit into from
Jun 13, 2024

Conversation

SapiensAnatis
Copy link
Owner

I was operating under the mistaken assumption that IOptions<T> represented the config value at the time of injection and that you only needed IOptionsMonitor<T> if you expected the value to change while you were holding on to the instance...

Turns out IOptions<T> does not reload at all at runtime.

@SapiensAnatis SapiensAnatis merged commit 89bf902 into main Jun 13, 2024
6 checks passed
@SapiensAnatis SapiensAnatis deleted the fix/reload branch June 13, 2024 23:15
SapiensAnatis added a commit that referenced this pull request Jun 30, 2024
I was operating under the mistaken assumption that `IOptions<T>`
represented the config value at the time of injection and that you only
needed `IOptionsMonitor<T>` if you expected the value to change while
you were holding on to the instance...

Turns out `IOptions<T>` does not reload at all at runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant