This commit is contained in:
loveuer
2025-07-14 10:48:21 +08:00
parent b48fa05d9f
commit 13ca43ee28
25 changed files with 830 additions and 125 deletions

View File

@ -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
}

View File

@ -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"
)