管理端初步
This commit is contained in:
+6
-6
@@ -12,10 +12,10 @@ type SessionIns struct {
|
||||
func (this *SessionIns) set() {
|
||||
|
||||
if this.ShortCache != nil {
|
||||
this.ShortCache.Cache(SESSION_TYPE+this.SessionId, this.Map)
|
||||
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
|
||||
}
|
||||
if this.LongCache != nil {
|
||||
this.LongCache.Cache(SESSION_TYPE+this.SessionId, this.Map)
|
||||
this.LongCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,23 +44,23 @@ func (this *SessionIns) Session(key string, data ...interface{}) *Obj {
|
||||
func (this *SessionIns) get() {
|
||||
|
||||
if this.ShortCache != nil {
|
||||
this.Map = this.ShortCache.Cache(SESSION_TYPE + this.SessionId).ToMap()
|
||||
this.Map = this.ShortCache.Cache(MUTEX_SESSION_TYPE + this.SessionId).ToMap()
|
||||
if this.Map != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if this.LongCache != nil {
|
||||
this.Map = this.LongCache.Cache(SESSION_TYPE + this.SessionId).ToMap()
|
||||
this.Map = this.LongCache.Cache(MUTEX_SESSION_TYPE + this.SessionId).ToMap()
|
||||
if this.Map != nil {
|
||||
if this.ShortCache != nil {
|
||||
this.ShortCache.Cache(SESSION_TYPE+this.SessionId, this.Map)
|
||||
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
this.Map = Map{}
|
||||
this.ShortCache.Cache(SESSION_TYPE+this.SessionId, this.Map)
|
||||
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user