feat: 为login和logout等优先使用redis缓存
This commit is contained in:
@@ -58,6 +58,10 @@ func (c *Client) SetBytes(ctx context.Context, key string, value []byte, ttl tim
|
||||
return c.rdb.Set(ctx, key, value, ttl).Err()
|
||||
}
|
||||
|
||||
func (c *Client) Del(ctx context.Context, key string) error {
|
||||
return c.rdb.Del(ctx, key).Err()
|
||||
}
|
||||
|
||||
func IsMiss(err error) bool {
|
||||
return err == redis.Nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user