Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I am using OrchardCore CMS as a SaaS solution to support multi-tenants.
Configuring options in OrchardCore is typically done by doing a database lookup (Single lookup per tenant per startup). After the single lookup, we read the same object from memory so the 2+ calls to configure options will not block the main thread but the first one does.
When you have many tenants and a frequent tenant reload/startup, this cause a frequent block that affect requests made to other tenants.
Six years ago similar request was denied without real explanation of why not dotnet/aspnetcore#2381 so the reason why not is not clear.
Describe the solution you'd like
I think there is a need to IConfigureOptionsAsync<>
to allow us to configure options asynchronously and eliminate the need to block the main thread while trying to configure the options.
Additional context
No response