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 nCachingType
      LOCAL fResult

      * only change caching type if we have a valid new cache type
      DO CASE               
         CASE nCachingType = INTERNET_FLAG_DONT_CACHE
              This.nCachingType = INTERNET_FLAG_DONT_CACHE
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_HYPERLINK
              This.nCachingType = INTERNET_FLAG_HYPERLINK
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_MAKE_PERSISTENT
              This.nCachingType = INTERNET_FLAG_MAKE_PERSISTENT
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_MUST_CACHE_REQUEST
              This.nCachingType = INTERNET_FLAG_MUST_CACHE_REQUEST
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_RELOAD
              This.nCachingType = INTERNET_FLAG_RELOAD
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_NO_CACHE_WRITE
              This.nCachingType = INTERNET_FLAG_NO_CACHE_WRITE
              fResult = .T.

         CASE nCachingType = INTERNET_FLAG_RESYNCHRONIZE
              This.nCachingType = INTERNET_FLAG_RESYNCHRONIZE
              fResult = .T.

      ENDCASE

      RETURN fResult