File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
5151func (c * client ) Close () error {
5252 if c .createdInternally && c .redisClient != nil {
5353 return c .redisClient .Close ()
You can’t perform that action at this time.
0 commit comments