aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/file.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-11-07 11:35:13 -0800
committerChris Lu <chris.lu@gmail.com>2018-11-07 11:35:13 -0800
commited8efb5aef4e2e7158d91d41eab54c052b0c3429 (patch)
tree5a06cf27137f914f1ca60752a70d40ca9a25b386 /weed/filesys/file.go
parent60db731e362adec2e0c27f3346d9fcff672a348d (diff)
downloadseaweedfs-ed8efb5aef4e2e7158d91d41eab54c052b0c3429.tar.xz
seaweedfs-ed8efb5aef4e2e7158d91d41eab54c052b0c3429.zip
much improved "ls -al" performance
Diffstat (limited to 'weed/filesys/file.go')
-rw-r--r--weed/filesys/file.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index db9cb0a0f..df02fe8f2 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -153,6 +153,8 @@ func (file *File) maybeLoadAttributes(ctx context.Context) error {
glog.V(1).Infof("file attr %v %+v: %d", file.fullpath(), file.entry.Attributes, filer2.TotalSize(file.entry.Chunks))
+ file.wfs.listDirectoryEntriesCache.Set(file.fullpath(), file.entry, 300*time.Millisecond)
+
return nil
})