Windows Dev Center

HttpFlushResponseCache function

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


ULONG HttpFlushResponseCache(
  _In_ HANDLE       ReqQueueHandle,
  _In_ PCWSTR       pUrlPrefix,
  _In_ ULONG        Flags,
  _In_ LPOVERLAPPED pOverlapped
);

Parameters

ReqQueueHandle [in]

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.

pUrlPrefix [in]

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.

Flags [in]

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.

pOverlapped [in]

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.

ValueMeaning
ERROR_INVALID_PARAMETER

One of the parameters are invalid.

Other

A system error code defined in WinError.h.

 

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 1.0 Functions
HttpAddFragmentToCache
HttpReadFragmentFromCache

 

 

Community Additions

ADD
Show:
© 2015 Microsoft