From f5c7a11da57413c496fd6eff3c0b326a1d14444d Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Sat, 10 Sep 2022 14:12:57 +0800 Subject: [PATCH] chore: add client ip to key of link cache --- internal/op/fs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/op/fs.go b/internal/op/fs.go index 80cf4f96..117258ad 100644 --- a/internal/op/fs.go +++ b/internal/op/fs.go @@ -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 }