Home > Net >  HttpClientFactory created HttpClient cache-control caching in how to support the response
HttpClientFactory created HttpClient cache-control caching in how to support the response

Time:10-02

HttpWebRequest CachePolicy properties can be set up, and HttpClient can not find the cache Settings,
When micro service call each other before, such as service use HttpClient invoke service b, service b returned in the response with cache-control: public, such as Max - age=600, normal is to automatically cache, but currently measured and found no caching capabilities, will request service b again

CodePudding user response:

Have a great god share

CodePudding user response:

No one encountered this problem

CodePudding user response:

You can look at this article https://blog.csdn.net/chenpeng19910926/article/details/71724037

CodePudding user response:

reference sxty0220 reply: 3/f
you can take a look at this article https://blog.csdn.net/chenpeng19910926/article/details/71724037

This is a Java

CodePudding user response:

Creation is there are two methods of heavy,

In Microsoft's official website have so again document

https://docs.microsoft.com/zh-cn/dotnet/api/system.net.http.httpmessagehandler? View=netframework 4.8

In WebRequestHandler derived class be rewritten

But personally, I suggest that in fact more in c # F1 look at Microsoft's official documentation may be faster than the search engine to

CodePudding user response:

I have a question, I have been looking for these days, HttpClientFactory is. NET CORE product, I think it how to use, in the public library instead of DI, layer of the main implementation
  • Related