<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.0" />

Microsoft.Extensions.Options.IOptionsMonitorCache<TOptions>

public interface IOptionsMonitorCache<TOptions>
Used by IOptionsMonitor<T> to cache TOptions instances.
void Clear()

Clears all options instances from the cache.

TOptions GetOrAdd(string name, Func<TOptions> createOptions)

Gets a named options instance, or adds a new instance created with createOptions.

bool TryAdd(string name, TOptions options)

Tries to adds a new option to the cache.

bool TryRemove(string name)

Tries to remove an options instance.