Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Use DI for the IOptionsCache internal to OptionsManager<T> #3067

Closed
AndrewTriesToCode opened this issue Apr 17, 2018 · 2 comments
Closed

Comments

@AndrewTriesToCode
Copy link
Contributor

AndrewTriesToCode commented Apr 17, 2018

I am using a derived implementation of IOptionsCache to for certain multitenant situations. OptionsMonitor uses DI to get the cache, but OptionsManager does not. This means that using IOption or IOptionsSnapshot (which both resolve to OptionsManager) I can't use my own IOptionsCache implementation.

Is this something that could please be considered?

Update: edited to correctly refer to OptionsManager as the root cause.

@AndrewTriesToCode AndrewTriesToCode changed the title Request: Use DI for the IOptionsCache internal to IOptions<T> Request: Use DI for the IOptionsCache internal to OptionsManager<T> Apr 18, 2018
@HaoK
Copy link
Member

HaoK commented Aug 4, 2018

The options manager is pretty simple, you can just drop in your own OptionsManager implementation that uses whatever cache you want.

@AndrewTriesToCode
Copy link
Contributor Author

@HaoK, thanks for the reply. Yeah that’s what I ended up doing with the benefit of letting the programmer having a choice between the default or my implementation.

natemcmaster pushed a commit that referenced this issue Nov 15, 2018
Prior to this, only the response body counted toward the HTTP/2 response data rate. This PR aligns the HTTP/2 logic closer to the HTTP/1.x logic and measures the rate for all HTTP/2 response data.

This PR also accounts for all response bytes written, not just those that immediately induced backpressure.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants