Add vfs cache poll interval

This commit is contained in:
Mukhtar Akere
2025-08-05 12:29:55 +01:00
parent fab3a7e4f7
commit c620ba3d56
3 changed files with 24 additions and 7 deletions

View File

@@ -99,6 +99,7 @@ type Rclone struct {
VfsReadChunkSize string `json:"vfs_read_chunk_size,omitempty"` // Read chunk size (default 128M)
VfsReadChunkSizeLimit string `json:"vfs_read_chunk_size_limit,omitempty"` // Max chunk size (default off)
VfsReadAhead string `json:"vfs_read_ahead,omitempty"` // read ahead size
VfsPollInterval string `json:"vfs_poll_interval,omitempty"` // How often to rclone cleans the cache (default 1m)
BufferSize string `json:"buffer_size,omitempty"` // Buffer size for reading files (default 16M)
// File system settings
@@ -415,6 +416,7 @@ func (c *Config) setDefaults() {
if c.Rclone.VfsCacheMode != "off" {
c.Rclone.VfsCachePollInterval = cmp.Or(c.Rclone.VfsCachePollInterval, "1m")
c.Rclone.VfsReadChunkSizeLimit = cmp.Or(c.Rclone.VfsReadChunkSizeLimit, "off")
c.Rclone.VfsCachePollInterval = cmp.Or(c.Rclone.VfsCachePollInterval, "1m") // Clean cache every minute
}
c.Rclone.AttrTimeout = cmp.Or(c.Rclone.AttrTimeout, "10s")