SetCachingMethod Method
Class: FTP_SERVICE
Changes the current file caching method.
=
Object.SetCachingMethod
Parameter
nCachingType
Cache type for internet connection.
Type Numeric
Direction Input
Can be on of the following
ValueDescription
INTERNET_FLAG_DONT_CACHE Does not add the returned entity to the cache. This is identical to the preferred value, INTERNET_FLAG_NO_CACHE_WRITE .
INTERNET_FLAG_HYPERLINK Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network.
INTERNET_FLAG_MAKE_PERSISTENT No longer supported.
INTERNET_FLAG_MUST_CACHE_REQUEST Identical to the preferred value, INTERNET_FLAG_NEED_FILE . Causes a temporary file to be created if the file cannot be cached.
INTERNET_FLAG_RELOAD Forces a download of the requested file, object, or directory listing from the origin server, not from the cache.
INTERNET_FLAG_NO_CACHE_WRITE Does not add the returned entity to the cache.
INTERNET_FLAG_RESYNCHRONIZE Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded.
Assumed from MSDN.
Return value Boolean
The return value is .T. if nCachingType is knowly.
Example
#INCLUDE "ftp.h"
LOCAL loFTP
SET PROCEDURE TO ftp.prg ADDITIVE 
loFTP=CREATEOBJECT('ftp_service') 
IF loFTP.SetCachingMethod(INTERNET_FLAG_DONT_CACHE)
   ?loFTP.GetCachingMethod() 
ENDIF
RELEASE PROCEDURE ftp.prg
See also
Expand/Collapse source code of procedure SetCachingMethod Source Code
      LPARAMETERS INP nCachingType

      * only change caching type if we have a valid new cache type
      IF nCachingType = INTERNET_FLAG_DONT_CACHE OR ;
         nCachingType = INTERNET_FLAG_HYPERLINK OR ;
         nCachingType = INTERNET_FLAG_MUST_CACHE_REQUEST OR ;
         nCachingType = INTERNET_FLAG_NEED_FILE OR ;
         nCachingType = INTERNET_FLAG_NO_CACHE_WRITE OR ;
         nCachingType = INTERNET_FLAG_OFFLINE OR ;
         nCachingType = INTERNET_FLAG_RELOAD OR ;
         nCachingType = INTERNET_FLAG_RESYNCHRONIZE

         This.nCachingType = BITOR(This.nCachingType,nCachingType)
         RETURN .T.
      ENDIF

      RETURN .F.