This repository was archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cache Common Header Values. #918
Comments
Consider just making a static class with readonly instances on it and supporting instance of Then you can write code like this:
As a bonus our comparison for media types will generally just be a fast-path reference equality test. |
Agree with @rynowak. |
@Tratcher do you think this kind of class belongs in HttpAbstractions for common Content types? |
I hesitate to provide statics like that because the header types like MediaTypeHeaderValue are mutable. |
Depends on aspnet/HttpAbstractions#177 |
Closing this out after some discussion. The example provided above can't work because a If we have a perf issue, we'll drive it another way. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For Input and output formatters the supported media types should come from a cached pool. #868 , #896
The text was updated successfully, but these errors were encountered: