diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-06-11 01:50:00 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-06-11 01:50:00 -0700 |
| commit | 628b27ef3b4cf8c1c894430e0d40b0bc1de8ba96 (patch) | |
| tree | 009480e6bddd1646fd1caa3caabdafd2a9a4eade /weed/filesys/file.go | |
| parent | b9365de47b04414e704cb62a3cfa9753e8c5ec0c (diff) | |
| download | seaweedfs-628b27ef3b4cf8c1c894430e0d40b0bc1de8ba96.tar.xz seaweedfs-628b27ef3b4cf8c1c894430e0d40b0bc1de8ba96.zip | |
purge old cache implementation
Diffstat (limited to 'weed/filesys/file.go')
| -rw-r--r-- | weed/filesys/file.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index bafbd7cc8..2932d4910 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -150,8 +150,6 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f return nil } - file.wfs.cacheDelete(file.fullpath()) - return file.saveEntry() } @@ -168,8 +166,6 @@ func (file *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error return err } - file.wfs.cacheDelete(file.fullpath()) - return file.saveEntry() } @@ -186,8 +182,6 @@ func (file *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) return err } - file.wfs.cacheDelete(file.fullpath()) - return file.saveEntry() } @@ -219,7 +213,6 @@ func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { func (file *File) Forget() { t := util.NewFullPath(file.dir.FullPath(), file.Name) glog.V(3).Infof("Forget file %s", t) - file.wfs.fsNodeCache.DeleteFsNode(t) } func (file *File) maybeLoadEntry(ctx context.Context) error { @@ -278,9 +271,7 @@ func (file *File) saveEntry() error { return fuse.EIO } - if file.wfs.option.AsyncMetaDataCaching { - file.wfs.metaCache.UpdateEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry)) - } + file.wfs.metaCache.UpdateEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry)) return nil }) |
