EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Disable System Caching

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#35615
Posted: 01/19/2016 18:49:47
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

I remember some discussion about this in the past, but cannot find it now.

Is it possible to disable file system caching? Say, by forcing FILE_FLAG_NO_BUFFERING when receiving the OnOpenFile event? I vaguely recall something about this not being possible, but I'm curious if this has changed, and if anyone else has tried playing around with it.


Henri Hein
Thin Air Labs, Inc
#35618
Posted: 01/20/2016 03:34:00
by Volodymyr Zinin (EldoS Corp.)

In order to disable the file data caching set the CallbackFileSystem.FileCacheEnabled property to false.
Of course the flag FILE_FLAG_NO_BUFFERING works too. And it isn't depending to whether the the cache is enabled or not.
#35635
Posted: 01/20/2016 14:49:25
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

My FileCacheEnabled is set to FALSE, and I'm still seeing system caching. At least, I'm still seeing reads and writes from the system process (GetOriginatorProcessId() == 4) on a file that was saved from Excel. I assume this means some of the IO went through the cache.


Henri Hein
Thin Air Labs, Inc
#35636
Posted: 01/20/2016 15:08:46
by Volodymyr Zinin (EldoS Corp.)

Please specify what version of CBFS you are using.
Thanks.
#35644
Posted: 01/21/2016 14:23:54
by Henri Hein (Standard support level)
Joined: 02/13/2015
Posts: 14

5.1.161


Henri Hein
Thin Air Labs, Inc
#35646
Posted: 01/21/2016 14:57:52
by Volodymyr Zinin (EldoS Corp.)

The file data caching as well as interaction with the system cache have been significantly changed in CBFS version 6. It would be better to check the problem with that version.
Although there is still some sort of caching when the file is memory mapped (MapViewOfFile, etc). In that case if data is copied to a memory mapped section it remains there (in the memory) for some time and only later is flushed by the system memory manager to the file. This type of caching isn't possible to workaround.
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

Topic viewed 1629 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!