mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-26 03:45:06 +08:00
chore: add client ip to key of link cache
This commit is contained in:
@@ -142,7 +142,7 @@ func Link(ctx context.Context, storage driver.Driver, path string, args model.Li
|
|||||||
if file.IsDir() {
|
if file.IsDir() {
|
||||||
return nil, nil, errors.WithStack(errs.NotFile)
|
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 {
|
if link, ok := linkCache.Get(key); ok {
|
||||||
return link, file, nil
|
return link, file, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user