|
42 | 42 | <Docs>
|
43 | 43 | <summary>Specifies caching behavior for resources obtained using the Hypertext Transfer protocol (HTTP).</summary>
|
44 | 44 | <remarks>
|
45 |
| - <format type="text/markdown"><![CDATA[ |
46 |
| - |
47 |
| -## Remarks |
48 |
| - This enumeration is used to set the cache level specified by <xref:System.Net.Cache.HttpRequestCachePolicy> objects. |
49 |
| - |
50 |
| - This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server. |
51 |
| - |
52 |
| - The <xref:System.Net.HttpWebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for <xref:System.Net.HttpWebRequest> instances. The <xref:System.Net.WebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for a <xref:System.Net.WebRequest> instance. The <xref:System.Net.WebRequest.CachePolicy%2A> property is used to get or set the cache policy for a specific request. |
53 |
| - |
54 |
| - A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request. |
55 |
| - |
56 |
| - |
57 |
| - |
58 |
| -## Examples |
59 |
| - The following code example sets the application domain's caching policy to Default. |
60 |
| - |
61 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet2"::: |
62 |
| - :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2"::: |
| 45 | + <format type="text/markdown"><![CDATA[ |
| 46 | +
|
| 47 | +## Remarks |
| 48 | + This enumeration is used to set the cache level specified by <xref:System.Net.Cache.HttpRequestCachePolicy> objects. |
| 49 | +
|
| 50 | + This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server. |
| 51 | +
|
| 52 | + The <xref:System.Net.HttpWebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for <xref:System.Net.HttpWebRequest> instances. The <xref:System.Net.WebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for a <xref:System.Net.WebRequest> instance. The <xref:System.Net.WebRequest.CachePolicy%2A> property is used to get or set the cache policy for a specific request. |
| 53 | +
|
| 54 | + A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request. |
| 55 | +
|
| 56 | +
|
| 57 | +
|
| 58 | +## Examples |
| 59 | + The following code example sets the application domain's caching policy to Default. |
63 | 60 |
|
| 61 | + :::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2"::: |
| 62 | +
|
64 | 63 | ]]></format>
|
65 | 64 | </remarks>
|
66 | 65 | <altmember cref="P:System.Net.HttpWebRequest.DefaultCachePolicy" />
|
|
0 commit comments