Documentation for this section has not yet been entered.
Only content received using the System.Net.WebRequestMethods.Ftp.DownloadFile command is cached.
The following table describes the effects of FTP caching policies on System.Net.FtpWebRequest.
System.Net.Cache.RequestCacheLevel.Default |
Returns the cached resource if the resource is fresh, the content length is accurate, and the expiration, modification, and content length attributes are present. |
System.Net.Cache.RequestCacheLevel.BypassCache |
Returns the resource from the server. |
System.Net.Cache.RequestCacheLevel.CacheOnly |
Returns the cached resource if the content length is present and matches the entry size; otherwise, throws a System.Net.WebException. |
System.Net.Cache.RequestCacheLevel.CacheIfAvailable |
Returns the cached resource if the content length is provided and matches the entry size; otherwise, the resource is downloaded from the server and is returned to the caller. |
System.Net.Cache.RequestCacheLevel.Revalidate |
Returns the cached resource if the timestamp of the cached resource is the same as the time stamp of the resource on the server; otherwise, the resource is downloaded from the server, stored in the cache, and returned to the caller. |
System.Net.Cache.RequestCacheLevel.Reload |
Downloads the resource from the server, stores it in the cache, and returns the resource to the caller. |
System.Net.Cache.RequestCacheLevel.NoCacheNoStore |
If a cached resource exists, it is deleted. The resource is downloaded from the server and is returned to the caller. |
Setting FtpWebRequest.DefaultCachePolicy overrides any configuration setting.