cache: add support for polling
This commit is contained in:
parent
8a25ca786c
commit
b33e3f779c
4 changed files with 351 additions and 94 deletions
7
backend/cache/object.go
vendored
7
backend/cache/object.go
vendored
|
@ -272,7 +272,12 @@ func (o *Object) Remove() error {
|
|||
fs.Debugf(o, "removing object")
|
||||
_ = o.CacheFs.cache.RemoveObject(o.abs())
|
||||
_ = o.CacheFs.cache.removePendingUpload(o.abs())
|
||||
_ = o.CacheFs.cache.ExpireDir(NewDirectory(o.CacheFs, cleanPath(path.Dir(o.Remote()))))
|
||||
parentCd := NewDirectory(o.CacheFs, cleanPath(path.Dir(o.Remote())))
|
||||
_ = o.CacheFs.cache.ExpireDir(parentCd)
|
||||
// advertise to DirChangeNotify if wrapped doesn't do that
|
||||
if o.CacheFs.Fs.Features().DirChangeNotify == nil {
|
||||
o.CacheFs.notifyDirChangeUpstream(parentCd.Remote())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue