chore: add client ip to key of link cache

pull/1628/head
Noah Hsu 2022-09-10 14:12:57 +08:00
parent 043a79189d
commit f5c7a11da5
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ func Link(ctx context.Context, storage driver.Driver, path string, args model.Li
if file.IsDir() {
return nil, nil, errors.WithStack(errs.NotFile)
}
key := stdpath.Join(storage.GetStorage().MountPath, path)
key := stdpath.Join(storage.GetStorage().MountPath, path) + ":" + args.IP
if link, ok := linkCache.Get(key); ok {
return link, file, nil
}