CommitUrlCacheEntryCommitUrlCacheEntry*
*



Contents  *



Index  *Topic Contents
*Previous Topic: Persistent URL Cache Functions
*Next Topic: CreateUrlCacheEntry

CommitUrlCacheEntry

BOOL CommitUrlCacheEntry(
    IN LPCSTR lpszUrlName,
    IN LPCSTR lpszLocalFileName,
    IN FILETIME ExpireTime,
    IN FILETIME LastModifiedTime,
    IN DWORD CacheEntryType,
    IN LPCBYTE lpHeaderInfo,
    IN DWORD dwHeaderSize,
    IN LPCSTR lpszFileExtension,
    IN DWORD dwReserved
    );

Caches data in the specified file in the cache storage and associates it with the given URL.

lpszUrlName
Address of a string that contains the source name of the cache entry. The name string must be unique, and should not contain any escape characters.
lpszLocalFileName
Address of a string that contains the name of the local file that is being cached. This should be the same name as that returned by CreateUrlCacheEntry.
ExpireTime
FILETIME structure that contains the expire date and time (GMT) of the file that is being cached. If the expire date and time is unknown, set this parameter to zero.
LastModifiedTime
FILETIME structure that contains the last modified date and time (GMT) of the URL that is being cached. If the last modified date and time is unknown, set this parameter to zero.
CacheEntryType
Cache type bitmask. Currently, the cache entry type values have not been finalized, so this value does not serve a real purpose at this point, except for STICK_CACHE_ENTRY. Can be a combination of the following values:
COOKIE_CACHE_ENTRY
NORMAL_CACHE_ENTRY
OCX_CACHE_ENTRY
SPARSE_CACHE_ENTRY
STABLE_CACHE_ENTRY
STICKY_CACHE_ENTRY
TRACK_CACHE_ENTRY
TRACK_OFFLINE_CACHE_ENTRY
TRACK_ONLINE_CACHE_ENTRY
URLHISTORY_CACHE_ENTRY

The STICKY_CACHE_ENTRY type is used to make cache entries exempt from scavenging. The default exempt time for entries set using CommitUrlCacheEntry is one day. The exempt time can be changed using the SetUrlCacheEntryInfo function.

lpHeaderInfo
Address of the header information. If this parameter is not NULL, the header information is treated as extended attributes of the URL and is returned in the INTERNET_CACHE_ENTRY_INFO structure.
dwHeaderSize
Size of the header information. If lpHeaderInfo is not NULL, this value is assumed to indicate the size of the header information. An application can maintain headers as part of the data and provide dwHeaderSize together with a NULL value for lpHeaderInfo.
lpszFileExtension
Address of a buffer that contains information maintained in the cache database for future use. In this version of Win32 Internet functions, this information is not used.
dwReserved
Reserved. If redirection has taken place, this parameter should contain the address of a string containing the original URL. Otherwise, must be set to zero.

If the cache storage is full, CommitUrlCacheEntry invokes cache cleanup to make space for this new file. If the cache entry already exists, the function overwrites the entry if it is not in use. An entry is in use when it has been retrieved with either RetrieveUrlCacheEntryStream or RetrieveUrlCacheEntryFile.

Clients who add entries to the cache should set the headers to at least "HTTP/1.0 200 OK\r\n\r\n"; otherwise, Microsoft Internet Explorer and other WinInet clients will disregard the entry.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.