HttpFlushResponseCache function (http.h)
The HttpFlushResponseCache function removes from the HTTP Server API cache associated with a given request queue all response fragments that have a name whose site portion matches a specified UrlPrefix. The application must previously have called HttpAddUrl, or HttpAddUrlToUrlGroup to add this UrlPrefix or a valid prefix of it to the request queue in question, and then called HttpAddFragmentToCache to cache the associated response fragment or fragments.
Syntax
HTTPAPI_LINKAGE ULONG HttpFlushResponseCache(
[in] HANDLE RequestQueueHandle,
[in] PCWSTR UrlPrefix,
[in] ULONG Flags,
[in] LPOVERLAPPED Overlapped
);
Parameters
[in] RequestQueueHandle
Handle to the request queue with which this cache is associated. A request queue is created and its handle returned by a call to the HttpCreateRequestQueue function.
Windows Server 2003 with SP1 and Windows XP with SP2: The handle to the request queue is created by the HttpCreateHttpHandle function.
[in] UrlPrefix
Pointer to a UrlPrefix string to match against the site portion of fragment names. The application must previously have called HttpAddUrl to add this UrlPrefix or a valid prefix of it to the request queue in question, and then called HttpAddFragmentToCache to cache the associated response fragment.
[in] Flags
This parameter can contain the following flag:
HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE
Causes response fragments that have names in which the site portion is a hierarchical descendant of the specified UrlPrefix to be removed from the fragment cache, in addition to those fragments having site portions that directly match.
[in] Overlapped
For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure, or for synchronous calls, set it to NULL.
A synchronous call blocks until the cache operation is complete, whereas an asynchronous call immediately returns ERROR_IO_PENDING and the calling application then uses GetOverlappedResult or I/O completion ports to determine when the operation is completed. For more information about using OVERLAPPED structures for synchronization, see Synchronization and Overlapped Input and Output.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function is used asynchronously, a return value of ERROR_IO_PENDING indicates that the cache request is queued and completes later through normal overlapped I/O completion mechanisms.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
|
One of the parameters are invalid. |
|
A system error code defined in WinError.h. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | http.h |
Library | Httpapi.lib |
DLL | Httpapi.dll |