move redis config over to config file
This commit is contained in:
@@ -33,7 +33,7 @@ func GetSessionManager() *SessionManager {
|
||||
return instance
|
||||
}
|
||||
|
||||
func (manager *SessionManager) SetStoreType(storeType StoreType) {
|
||||
func (manager *SessionManager) SetStoreType(storeType StoreType, params ...any) {
|
||||
logging.Infof("Changing session manager store type")
|
||||
switch storeType {
|
||||
case InMemory:
|
||||
@@ -47,7 +47,9 @@ func (manager *SessionManager) SetStoreType(storeType StoreType) {
|
||||
}
|
||||
case Redis:
|
||||
{
|
||||
manager.store = store.NewRedisStore[*SessionData]()
|
||||
url, _ := params[0].(string)
|
||||
prefix, _ := params[1].(string)
|
||||
manager.store = store.NewRedisStore[*SessionData](url, prefix)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user