diff --git a/config/configs.go b/config/configs.go index 9279dfc..721eaa1 100644 --- a/config/configs.go +++ b/config/configs.go @@ -64,7 +64,7 @@ type ( EnabledSession bool `xml:"enabled,attr"` //启用Session SessionMode string `xml:"mode,attr"` //session mode,now support runtime、redis CookieName string `xml:"cookiename,attr"` //custom cookie name which sessionid store, default is dotweb_sessionId - Timeout int64 `xml:"timeout,attr"` //session time-out period, with minute + Timeout int64 `xml:"timeout,attr"` //session time-out period, with second ServerIP string `xml:"serverip,attr"` //remote session server url BackupServerUrl string `xml:"backupserverurl,attr"` //backup remote session server url StoreKeyPre string `xml:"storekeypre,attr"` //remote session StoreKeyPre diff --git a/session/session.go b/session/session.go index 898e8c4..b9600ab 100644 --- a/session/session.go +++ b/session/session.go @@ -34,7 +34,7 @@ type ( //session config info StoreConfig struct { StoreName string - Maxlifetime int64 + Maxlifetime int64 //session life time, with second CookieName string //custom cookie name which sessionid store ServerIP string //if use redis, connection string, like "redis://:password@10.0.1.11:6379/0" BackupServerUrl string //if use redis, if ServerIP is down, use this server, like "redis://:password@10.0.1.11:6379/0" diff --git a/session/store_runtime.go b/session/store_runtime.go index 9db3bfb..14d7d52 100644 --- a/session/store_runtime.go +++ b/session/store_runtime.go @@ -11,7 +11,7 @@ type RuntimeStore struct { lock *sync.RWMutex // locker sessions map[string]*list.Element // map in memory list *list.List // for gc - maxlifetime int64 + maxlifetime int64 // session life time, with second } func NewRuntimeStore(config *StoreConfig) *RuntimeStore { diff --git a/version.MD b/version.MD index b0fb376..b9f0421 100644 --- a/version.MD +++ b/version.MD @@ -1,5 +1,10 @@ ## dotweb版本记录: +#### Version 1.5.7.8 +* Improve Comments about session Maxlifetime +* Session.StoreConfig.Maxlifetime: session life time, with second +* 2018-09-20 15:00 + #### Version 1.5.7.7 * New Feature: Add HttpServer.SetEnabledAutoOPTIONS, used to set route use auto options * Detail: