Registry Settings for File Caching (Compact 2013)


The file system cache manager maintains a single, global portion of kernel virtual address space for file cache views. The size of this address space is set the first time the file cache filter is loaded, typically at OS startup. The size does not change after the filter is loaded.

The virtual memory size does not control how much physical memory is consumed by the file cache. Physical memory usage is managed by the file paging pool.

Virtual memory size is controlled by a registry value under the following registry key:


To set virtual memory size, set the CacheVMSize value:


If the virtual memory size is not specified in the registry, the system uses a default size of 32 MB. The virtual memory size cannot be smaller than 1 MB and cannot exceed 128 MB.

All other cache properties are controlled on a per-volume basis. These properties are controlled by setting the registry values under the file system driver or the storage manager profile for the volume.

You can place settings for the file cache filter in two different nodes in the registry:

  • Root file system key HKEY_LOCAL_MACHINE\System\StorageManager
    Settings made at the root key of the file system registry apply to every mounted instance of the FSD, unless explicitly overridden by a setting at a lower level.
    For an auto-load file system, this location is HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\<MyFSDName>\Filters\CacheFilt.
    For a file system that is loaded in response to a block device, the location is HKEY_LOCAL_MACHINE\System\StorageManager\<MyFSDName>\Filters\CacheFilt.
  • Profile-specific registry subkey HKEY_LOCAL_MACHINE\System\StorageManager\Profile\<MyProfileName>\<MyFSDName>\Filters\CacheFilt
    Settings made at the Profiles registry subkey apply only to mounted instances of the FSD on devices that report the profile <MyProfileName>.

The following table shows the registry settings that you can place at the root key or at a profile-specific subkey.

Registry value: Type



Specifies the name of the filter DLL. You must set this to cachefilt.dll to load the file cache filter.

LockIOBuffers: REG_DWORD

Specifies that the file system driver manager (FSDMGR) must lock all application buffers before passing them to file I/O functions.

Set this to 1 when using the file cache filter because the filter uses critical sections for file I/O.


Specifies the order in which the filter should be loaded in the filter stack.

To specify the order to load multiple filters on the filter stack, set Order values on each filterss. Otherwise, they are not loaded in a guaranteed order.

EnableFileCache: REG_DWORD

Specifies whether to cache files on this volume. If this value is not specified in the registry, it defaults to 1.

Set to 1 to enable caching.

Set to zero to force all files to be accessed uncached. The only reason to set this value to zero would be to use the cache filter to control handle access, sharing, and byte-range locking for a volume.

EnableFileCacheWriteBack: REG_DWORD

Enables write-back caching.

Set to 1 for write-back caching. This is the default.

Set to zero to use write-through caching on the volume.

If the cache filter is to run in a write-back, or lazy-write, mode, when used on a compressed file system that includes sparse files, data loss may occur.
In this case, set this value to zero to configure the cache filter in write-through mode.

FileCacheWriteBackTimeout: REG_DWORD

Specifies the maximum time, in milliseconds, that file data can remain in the cache before being written back.

This value is used only when the volume is in write-back caching mode.

The default is 5000, or 5 seconds.

FileCacheWriteBackPriority256: REG_DWORD

Specifies the priority of the thread that writes back data after the write-back timeout expires.

This value is used only when the volume is in write-back caching mode.

The default value is 255, the lowest possible priority.

Each volume that enables write-back caching has its own write-back thread. This thread flushes the dirty pages in all open files for the volume. The thread waits a specified time after the first write completes, and then flushes all the files on the volume.

See Also


File Systems and Storage Management Registry Settings
File Systems Registry Settings Overview