1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-24 05:17:03 +00:00

minor version 11.2.2 - register sessions as middleware and Context.HTML/Text like Context.Writef

Former-commit-id: 6f5f1c502fb06d739c350c3ecc891f495dc03a6e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-24 19:51:42 +03:00
parent 275cc14e39
commit 29bf846bd1
10 changed files with 95 additions and 39 deletions

View File

@@ -411,6 +411,11 @@ func (s *Session) Visit(cb func(k string, v interface{})) {
s.provider.db.Visit(s.sid, cb)
}
// Len returns the total number of stored values in this session.
func (s *Session) Len() int {
return s.provider.db.Len(s.sid)
}
func (s *Session) set(key string, value interface{}, immutable bool) {
s.provider.db.Set(s.sid, s.Lifetime, key, value, immutable)