ClearDocumentCacheFiles;
The ClearDocumentCacheFiles clears cache of documents.
When documents are opened, cache is created to speed up work with external files. The cache is located in the user profile by default, in the subdirectory "\AppData\Local\Foresight\Foresight Analytics Platform\AsmCache<n>\Mod\<Repository ID>\<assembly number>\CachedFiles\Documents".
Clearing document cache document frees the disk space. Executing the ClearDocumentCacheFiles method clears cache of all documents. When a specific document is deleted in the object navigator or using the IMetabase.DeleteObject method, cache of this document is cleared automatically.
For details about repository objects caching see the Repository Objects Caching section.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
Begin
MB := MetabaseClass.Active;
// Clear document cache
MB.ClearDocumentCacheFiles;
End Sub UserProc;
After executing the example the document cache is cleared.
See also: