Share via


Overriding Cache Settings for a File (Windows Embedded CE 6.0)

1/6/2010

Each volume has its own default caching properties, specified in the device registry. By default, the file handles on a cached volume inherit the caching properties of the volume. Caching properties of file accesses can also be controlled on a per-file-handle basis.

It is not possible to add caching to a file handle on an uncached volume. However, you can open an uncached file handle on a cached volume, by calling CreateFile with the FILE_FLAG_NO_BUFFERING flag set.

The file system cache manager enables multiple handles to the same file to be open concurrently with different caching settings and protects data against consistency problems.

It is not possible to make a file handle write-back when it is stored on a write-through volume. However, you can open a write-through file handle on a write-back volume by calling CreateFile with the FILE_FLAG_WRITE_THROUGH flag. Multiple handles to the same file can be open concurrently without affecting each other. Each handle can have different write-through semantics.

See Also

Reference

Registry Settings for File Caching
CreateFile

Concepts

File Cache Management