FileCache Property
Which file data cache implementation to use.
Syntax
cbfs.getFileCache([callback]) cbfs.setFileCache( fileCache, [callback])
Possible Values
0 (fcNone), 1 (fcSystem), 2 (fcInternalKernelMode), 3 (fcInternalUserMode)
Default Value
1
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getFileCache([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setFileCache([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property specifies which file data cache implementation a virtual drive should use, if any. Possible values are:
- fcNone (0): Do not use file data caching.
- fcSystem (1, default): Delegate file data caching to the Windows file management system cache (recommended).
- fcInternalKernelMode (2): Use the CBFS kernel mode file data cache implementation.
- fcInternalUserMode (3): Use the CBFS user mode file data cache implementation.
When set to fcInternalUserMode (3), the UserModeFileCacheSize configuration setting can be used to control the cache size.
Please refer to the Caching topic for detailed information on each of the cache implementations.
Note: This property cannot be changed within events.
Data Type
Integer