fully convert redis over to custom key value store type
This commit is contained in:
@@ -42,6 +42,7 @@ func NewRedisStore[Value any]() *RedisStore[Value] {
|
||||
store := &RedisStore[Value]{
|
||||
client: rdb,
|
||||
ctx: ctx,
|
||||
prefix: "random_string_1",
|
||||
}
|
||||
return store
|
||||
}
|
||||
@@ -77,7 +78,7 @@ func (m *RedisStore[Value]) Get(sessionID string) (Value, error) {
|
||||
return session_data, ErrKeyBackend
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(data, session_data); err != nil {
|
||||
if err := json.Unmarshal(data, &session_data); err != nil {
|
||||
logging.Error(err.Error())
|
||||
return session_data, ErrKeyBackend
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user