HttpBaseProtocolFilter.CacheControl Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get or set the read and write cache control behavior to be used on the HttpBaseProtocolFilter object.
public:
property HttpCacheControl ^ CacheControl { HttpCacheControl ^ get(); };
HttpCacheControl CacheControl();
public HttpCacheControl CacheControl { get; }
var httpCacheControl = httpBaseProtocolFilter.cacheControl;
Public ReadOnly Property CacheControl As HttpCacheControl
Property Value
The cache control behavior to be used on the HttpBaseProtocolFilter object.
Remarks
The CacheControl property gets an HttpCacheControl object that allows access to the read and write cache control behavior used by the HttpBaseProtocolFilter object. HTTP read requests can use the local HTTP cache for the responses. Content returned by HTTP requests can be written to the local HTTP cache.
The CacheControl property allows a developer to set simple read and write cache control behavior on the HttpBaseProtocolFilter object. To use this feature, an app creates an HttpClient object with a new HttpBaseProtocolFilter object . The CacheControl property on the HttpBaseProtocolFilter returns an HttpCacheControl object. Properties on the HttpCacheControl object are used to set to the read and write cache control behavior for the HttpBaseProtocolFilter and the associated HttpClient object. This determines the read and write cache behavior on responses to HttpClient requests.
Developers can still use the HTTP Cache-Control header for more complete control over caching. The HttpCacheDirectiveHeaderValueCollection provides a collection container for instances of the cache directives in Cache-Control HTTP header on HTTP content associated with an HTTP request or response. The Cache-Control header lets an app control caching behavior used by a server on HTTP content.