Skip to content

Commit 0491ef6

Browse files
committed
- Updated comments in redis/client.go
1 parent f622c74 commit 0491ef6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/cache/redis/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type client struct {
2121
redisClient *redis.Client // Underlying Redis client
2222
mu sync.Mutex // Protects counters map
2323
counters map[string]int // Operation counters for stats (e.g., "Get", "GetMiss")
24-
createdInternally bool // 标记 redisClient 是否由本结构体创建
24+
createdInternally bool // Indicates whether redisClient was created by this struct
2525
}
2626

2727
// Ensure client implements thing.CacheClient and io.Closer.
@@ -47,7 +47,7 @@ type Options struct {
4747
DB int
4848
}
4949

50-
// Close implements io.Closer. 仅当 client.createdInternally true 时关闭 redisClient。
50+
// Close implements io.Closer. Only closes redisClient if client.createdInternally is true.
5151
func (c *client) Close() error {
5252
if c.createdInternally && c.redisClient != nil {
5353
return c.redisClient.Close()

0 commit comments

Comments
 (0)