mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 00:40:26 +08:00
fix: 缓存使用redis无法set问题修复&admin账号默认有所有菜单
This commit is contained in:
@@ -23,8 +23,11 @@ func Get(key string) (string, error) {
|
||||
}
|
||||
|
||||
// set key value
|
||||
func Set(key string, val string, expiration time.Duration) {
|
||||
cli.Set(context.TODO(), key, val, expiration)
|
||||
func Set(key string, val string, expiration time.Duration) error {
|
||||
if expiration < 0 {
|
||||
expiration = 0
|
||||
}
|
||||
return cli.Set(context.TODO(), key, val, expiration).Err()
|
||||
}
|
||||
|
||||
func Del(key string) {
|
||||
|
||||
Reference in New Issue
Block a user