How catfs caching and writing works
masterCatfs uses a read-ahead and write-through caching semantic.
- Read-ahead: Data is cached as it is accessed.
- Write-through: Data is written to both the source filesystem and the cache.
- Metadata: Currently, all metadata operations hit the source filesystem directly; only data is cached.
- File Caching: If a file is opened for reading, the entire file is cached, even if only a portion is read.
- Non-sequential Writes: If the filesystem (like
goofys) emitsENOTSUPfor non-sequential writes, catfs falls back to flushing the entire file onclose(). This means changing a single byte may trigger a full rewrite of the file.
Warning: Catfs is ALPHA software. Do not use it if you value your data.