Browse Source

修改session

wangchuanjin 2 năm trước cách đây
mục cha
commit
827796ee82
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      go-xweb/httpsession/session.go

+ 4 - 0
go-xweb/httpsession/session.go

@@ -39,6 +39,10 @@ func (session *Session) Del(keys ...string) bool {
 	return session.manager.store.Del(session.id, keys...)
 }
 
+func (session *Session) Clear() bool {
+	return session.manager.store.Clear(session.id)
+}
+
 func (session *Session) Invalidate(rw http.ResponseWriter) {
 	session.manager.Invalidate(rw, session)
 }