wip: jwt
This commit is contained in:
4
pkg/database/cache/new.go
vendored
4
pkg/database/cache/new.go
vendored
@ -3,9 +3,9 @@ package cache
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"loveuer/utodo/pkg/tool"
|
||||
"net/url"
|
||||
|
||||
"gitea.loveuer.com/yizhisec/packages/tool"
|
||||
"github.com/dgraph-io/ristretto/v2"
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
@ -41,7 +41,7 @@ func New(opts ...Option) (Cache, error) {
|
||||
Password: password,
|
||||
})
|
||||
|
||||
if err = client.Ping(tool.CtxTimeout(cfg.ctx, 5)).Err(); err != nil {
|
||||
if err = client.Ping(tool.TimeoutCtx(cfg.ctx, 5)).Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
2
pkg/database/cache/redis.go
vendored
2
pkg/database/cache/redis.go
vendored
@ -3,10 +3,10 @@ package cache
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"loveuer/utodo/pkg/tool"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"gitea.loveuer.com/yizhisec/packages/tool"
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
Reference in New Issue
Block a user