fix(fs): update objs cache (#507)

This commit is contained in:
Seven
2025-07-01 15:46:34 +08:00
committed by GitHub
parent aae3851979
commit f26892ac3c

View File

@ -573,8 +573,12 @@ func Put(ctx context.Context, storage driver.Driver, dstDirPath string, file mod
}
case driver.Put:
err = s.Put(ctx, parentDir, file, up)
if err == nil && !utils.IsBool(lazyCache...) {
ClearCache(storage, dstDirPath)
if err == nil {
if !utils.IsBool(lazyCache...) {
ClearCache(storage, dstDirPath)
} else {
addCacheObj(storage, dstDirPath, model.WrapObjName(file))
}
}
default:
return errs.NotImplement