allow redis to be selected as session store type
This commit is contained in:
@@ -21,6 +21,7 @@ type StoreType int
|
||||
|
||||
const (
|
||||
InMemory StoreType = iota
|
||||
Redis
|
||||
)
|
||||
|
||||
func GetSessionManager() *SessionManager {
|
||||
@@ -38,6 +39,11 @@ func (manager *SessionManager) SetStoreType(storeType StoreType) {
|
||||
manager.store = NewMemoryStore()
|
||||
break
|
||||
}
|
||||
case Redis:
|
||||
{
|
||||
manager.store = NewRedisStore()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user