mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
vfs: stop change notify polling clearing so much of the directory cache
Before this change, change notify polls would clear the directory cache recursively. So uploading a file to the root would clear the entire directory cache. After this change we just invalidate the directory cache of the parent directory of the item and if the item was a directory we invalidate it too.
This commit is contained in:
@@ -232,7 +232,7 @@ func New(f fs.Fs, opt *Options) *VFS {
|
||||
// Start polling function
|
||||
if do := vfs.f.Features().ChangeNotify; do != nil {
|
||||
vfs.pollChan = make(chan time.Duration)
|
||||
do(context.TODO(), vfs.root.ForgetPath, vfs.pollChan)
|
||||
do(context.TODO(), vfs.root.changeNotify, vfs.pollChan)
|
||||
vfs.pollChan <- vfs.Opt.PollInterval
|
||||
} else {
|
||||
fs.Infof(f, "poll-interval is not supported by this remote")
|
||||
|
||||
Reference in New Issue
Block a user