Hi,
When opening or creating a file with the CreateFile function, the FILE_FLAG_NO_BUFFERING flag can be specified to disable system caching of data being read from or written to the file.
The function of FILE_FLAG_WRITE_THROUGH is write operations will not go through any intermediate cache, they will go directly to disk.
You could use these two flags to bypass the cache when creating files, so as to avoid the inability to clear the cache of some files.
Please refer to the document for more details.
Best Regards,
Elya
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.