feat 初始化
This commit is contained in:
@@ -48,3 +48,11 @@ func (c *CacheClient) Get(ctx context.Context, key string, dst interface{}) bool
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *CacheClient) Exists(ctx context.Context, key ...string) bool {
|
||||
n, err := c.cli.Exists(ctx, key...).Result()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return n > 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user