Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.3k stars 265 forks source link

Add interface for accessing tenant options #102

Closed AndrewTriesToCode closed 5 years ago

AndrewTriesToCode commented 5 years ago

The normal way to get options in ASP.NET Core -- IOptions<MyOptionType> etc. will provide the options for the current tenant only. If you look under-the-hood you will see that each tenants options are cached in way that makes it difficult to retrieve or clear the cached options for a specific tenant (ie other than the current tenant).

There should be a way to access or clear the cached options for a specific tenant without having to dig into the Finbuckle.MultiTenant and ASP.NET Core internals.

AndrewTriesToCode commented 5 years ago

Partially, implemented with 3.0. Still cannot access options for a different tenant--but I am not sure that is a good idea anyway. Closing this story for now.