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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user