SetUserCachingKey Callback Function

The SetUserCachingKey callback function is used by Web filters to set the user caching key. The user caching key is the key that the request will be cached with. This key is used to check if the given request is in the cache, so there is no need to pass the request to the server. The key is also used to cache the server response after it arrives. The URL of the request is used as the default cache key.

The SetUserCachingKey callback function is declared as:


BOOL WINAPI * SetUserCachingKey(
  __in  struct _HTTP_FILTER_CONTEXT* pfc,
  __in  LPSTR lpszCacheKey 


  • pfc
    Pointer to the HTTP_FILTER_CONTEXT data structure that is associated with the current, active HTTP session. Pass the filter context in this parameter.

  • lpszCacheKey
    Pointer to a null-terminated string containing the new caching key.

Return Value

This callback function returns TRUE if the call is successful; otherwise, it returns FALSE. To obtain extended error information, call GetLastError.


Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.

Declared in Wpxhttpfilt.h.


Requires W3Filter.dll.

See Also

Callback Functions

Send comments about this topic to Microsoft

Build date: 6/30/2010