CloseCache Method
Closes the cache.
Syntax
Remarks
This method closes the cache, optionally performing file flushing and purging operations before doing so.
The FlushAction parameter specifies what kind of flushing to perform, if any. It must be one of the following values:
FLUSH_DELAYED | 0 | Flush as usual, taking into account any specified delay.
The FlushAfterCloseDelay property specifies the delay. Passing this value to Close or CloseFileEx will cause the method to return immediately; flushing is performed in background. |
FLUSH_NONE | 1 | Do not flush anything. |
FLUSH_IMMEDIATE | 2 | Flush immediately.
Passing this value to Close or CloseFileEx will cause the method to return only after all flushing operations are complete. |
The PurgeAction parameter specifies what kind of purging to perform, if any. It must be one of the following values:
PURGE_DELAYED | 0 | Purge as usual, taking into account any specified delay.
The PurgeAfterCloseDelay property specifies the delay. Passing this value to Close or CloseFileEx will cause the method to return immediately; purging is performed in background. |
PURGE_NONE | 1 | Do not purge anything. |
PURGE_IMMEDIATE | 2 | Purge immediately.
Passing this value to Close or CloseFileEx will cause the method to return only after all purging operations are complete. |
.NET Standard Notes
To call this method in an asynchronous manner call CloseCacheAsync instead. When the method completes (or an error is encountered) the CloseCacheCompleted event will fire.