use cachingfs
This commit is contained in:
parent
892908fcf5
commit
61b665af13
10 changed files with 1963 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/hanwen/go-fuse/fuse"
|
||||
"github.com/hanwen/go-fuse/fuse/nodefs"
|
||||
"github.com/hanwen/go-fuse/fuse/pathfs"
|
||||
"github.com/hanwen/go-fuse/unionfs"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
|
@ -31,6 +32,7 @@ func NewWsFs(opts WsFsOpts, req chan RequestCallback, closer chan bool) *pathfs.
|
|||
if opts.ReadOnly {
|
||||
fs = pathfs.NewReadonlyFileSystem(fs)
|
||||
}
|
||||
fs = unionfs.NewCachingFileSystem(fs, 1*time.Second)
|
||||
return pathfs.NewPathNodeFs(fs, nil)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue