cleanup: if triggerValue has a value, fast break

Signed-off-by: xigang <wangxigang2014@gmail.com>
This commit is contained in:
xigang 2024-03-04 10:29:31 +08:00
parent 6d2ee131eb
commit d72448a41c

View File

@ -546,6 +546,7 @@ func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions
if field == c.indexedTrigger.indexName {
if value, ok := pred.Field.RequiresExactMatch(field); ok {
triggerValue, triggerSupported = value, true
break
}
}
}