You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a brief summary of your proposal. Two to three sentences is best here.
The option to disable the caching for a request - preferably using HttpRequestMessage.Options.Set() to set a value on the HttpRequestMessage which disables caching for a single request/response.
Why? Cause you can't change handlers after the Client is initiated and I don't want to create multiple HttpClients for this.
API Changes
Include a list of all API changes, additions, subtractions as would be required by your proposal.
e.g.
In order for this to work - the IF statement which checks if it's inside the cache also needs to check HttpRequestMessage.Options if the option to skip cache has been set
publicreadonlyHttpRequestOptionsKey<bool>UseCache=new("UseCache");
....
// Inside SendAsync and Sendif(!(request.Options.TryGetValue(UseCache,outbooluseCache)&&useCache)&&(request.Method==HttpMethod.Get||request.Method==HttpMethod.Head))
Intended Use Case
Provide a detailed example of where your proposal would be used and for what purpose.
It can be used to force up date the cache depending if the above IF change is also included in the IF statement for storing the response - second it can be used to skip the cache all together when needed.
The text was updated successfully, but these errors were encountered:
Summary
Please provide a brief summary of your proposal. Two to three sentences is best here.
The option to disable the caching for a request - preferably using
HttpRequestMessage.Options.Set()
to set a value on theHttpRequestMessage
which disables caching for a single request/response.Why? Cause you can't change handlers after the Client is initiated and I don't want to create multiple
HttpClients
for this.API Changes
Include a list of all API changes, additions, subtractions as would be required by your proposal.
e.g.
In order for this to work - the IF statement which checks if it's inside the cache also needs to check
HttpRequestMessage.Options
if the option to skip cache has been setHttpClient.Caching/HttpClient.Caching/InMemory/InMemoryCacheHandler.cs
Line 109 in f2831a7
Intended Use Case
Provide a detailed example of where your proposal would be used and for what purpose.
It can be used to force up date the cache depending if the above IF change is also included in the IF statement for storing the response - second it can be used to skip the cache all together when needed.
The text was updated successfully, but these errors were encountered: