12.2.3. File Cache Store Configuration (Library Mode)
In JBoss Data Grid's Library mode, configure a File Cache Store within the loaders element as follows:
The
fileStore element is used to configure the File Cache Store with the following parameters:
- The
locationparameter provides a location on the disk where the file store can write internal files. The default value for this parameter is theInfinispan-Filestoredirectory in the working directory. - The
streamBufferSizeparameter sets the size of the buffered stream used to write the state to the disk. Larger buffer sizes result in faster performance but occupy more temporary memory. The default value for this parameter is8192bytes. - The
fsyncModeparameter sets how the file changes synchronize with the underlying file system. Valid values for this parameter areDEFAULT(synchronize when the operating system buffer is full or when the bucket is read),PER_WRITE(synchronize after each write request) andPERIODIC(synchronizes after a defined interval or just before a bucket is read). - The
fsyncIntervalparameter specifies the time period after which the file changes in the cache are flushed. This parameter is used only when the periodic fsync mode is in use. The default value for this parameter is1second.