PrjClearNegativePathCache function (projectedfslib.h)

Purges the virtualization instance's negative path cache, if it is active.

Syntax

HRESULT PrjClearNegativePathCache(
  [in]            PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT namespaceVirtualizationContext,
  [out, optional] UINT32                               *totalEntryNumber
);

Parameters

[in] namespaceVirtualizationContext

Opaque handle for the virtualization instance.

[out, optional] totalEntryNumber

Optional pointer to a variable that receives the number of paths that were in the cache before it was purged.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If the negative path cache is active, then if the provider indicates that a file path does not exist by returning HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) from its PRJ_GET_PLACEHOLDER_INFO_CB callback, ProjFS will fail subsequent opens of that path without calling the PRJ_GET_PLACEHOLDER_INFO_CB callback again. This helps improve performance of virtualization instances that host workloads that frequently probe for the presence of a file by trying to open it.

To resume receiving the PRJ_GET_PLACEHOLDER_INFO_CB callback for paths the provider has indicated do not exist, the provider must call this routine.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server [desktop apps only]
Target Platform Windows
Header projectedfslib.h