* Unfortunately MemProvider Init does not actually Init properly Worse all of its members are private and you cannot update them. Simple fix copy it in to modules session. Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix misspelling
This commit is contained in:
parent
d7aa553f1b
commit
497f37bffd
2 changed files with 218 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
package session
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
@ -38,7 +39,7 @@ func (o *VirtualSessionProvider) Init(gclifetime int64, config string) error {
|
|||
// This is only slightly more wrong than modules/setting/session.go:23
|
||||
switch opts.Provider {
|
||||
case "memory":
|
||||
o.provider = &session.MemProvider{}
|
||||
o.provider = &MemProvider{list: list.New(), data: make(map[string]*list.Element)}
|
||||
case "file":
|
||||
o.provider = &session.FileProvider{}
|
||||
case "redis":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue