Conversation
|
I'm not sure this makes sense given it doesn't own anything and a lot of people share options for the lifetime or for multiple multiplexers or pooling, so the IDE advice can be bad here instructing to dispose too. I agree with the problem scenario, just don't think this is a good path to take trying to solve that category of stuff. |
|
The fact that the options and defaults provider often/usually have very different lifetimes makes this... awkward. It is not usually the cast that the two are linked, and most of the time this would be unnecessary and/or incorrect - making busy-work without need. I wonder whether there's some new wrapper API that we'd need instead, i.e. so some API would return a |
|
Closing this. We'll use a different approach that relies on a new |
Creating this PR for discussion.
The main advantage of IDisposable ConfigurationOptions is it enables graceful shutdown of IDisposable default options providers like AzureCacheOptionsProviderWithToken, which has a token refresh Timer that should be stopped.