DefaultRedisConfig returns a default Redis configuration
()
| 47 | |
| 48 | // DefaultRedisConfig returns a default Redis configuration |
| 49 | func DefaultRedisConfig() *RedisConfig { |
| 50 | return &RedisConfig{ |
| 51 | Addr: "localhost:6379", |
| 52 | Password: "", |
| 53 | DB: 0, |
| 54 | CacheSize: 128 * 1024 * 1024, // 128MB |
| 55 | CacheTTL: time.Minute, |
| 56 | PoolSize: 10, |
| 57 | ConnMaxIdleTime: 30 * time.Minute, |
| 58 | ConnMaxLifetime: time.Hour, |
| 59 | KeyPrefix: "gin-jwt:", |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // NewRedisRefreshTokenStore creates a new Redis-based refresh token store with client-side caching |
| 64 | func NewRedisRefreshTokenStore(config *RedisConfig) (*RedisRefreshTokenStore, error) { |
no outgoing calls
searching dependent graphs…