管理端初步

This commit is contained in:
hoteas
2017-09-05 01:42:04 +00:00
parent 1436bad723
commit 22e092daba
4 changed files with 220 additions and 250 deletions
+6 -6
View File
@@ -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
}