Skip to content

The IOptions<T> implementation can be optimized #45260

@davidfowl

Description

@davidfowl

Description

Today both IOptions<T> and IOptionsSnapshot<T> share an implementation OptionsManager<T>. This implements both IOptions<T> and IOptionsSnapshot<T> and ends up paying the cost of the concurrent dictionary for IOptions<T> when the value is set once and never changes.

We can split the implementation into a different type that implements IOptions<T> and doesn't use the cache.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions