Skip to content

Commit 0e9dcc9

Browse files
When reading expired sessions - expire them (#12686) (#12690)
* When reading expired sessions - expire them Update to latest macaron/session following merge of https://gitea.com/macaron/session/pulls/11 Also remove old memory provider as 11 updates the memory provider to make it unnecessary. Signed-off-by: Andrew Thornton <[email protected]> * and macaron/session/pulls/12 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: zeripath <[email protected]>
1 parent 87f02d9 commit 0e9dcc9

File tree

9 files changed

+32
-231
lines changed

9 files changed

+32
-231
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
gitea.com/macaron/i18n v0.0.0-20190822004228-474e714e2223
1616
gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a
1717
gitea.com/macaron/macaron v1.4.0
18-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d
18+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e
1919
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7
2020
github.com/BurntSushi/toml v0.3.1
2121
github.com/PuerkitoBio/goquery v1.5.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ gitea.com/macaron/macaron v1.4.0 h1:FY1QDGqyuUzs21K6ChkbYbRUfwL7v2aUrhNEJ0IgsAw=
3737
gitea.com/macaron/macaron v1.4.0/go.mod h1:P7hfDbQjcW22lkYkXlxdRIfWOXxH2+K4EogN4Q0UlLY=
3838
gitea.com/macaron/session v0.0.0-20190821211443-122c47c5f705 h1:mvkQGAlON1Z6Y8pqa/+FpYIskk54mazuECUfZK5oTg0=
3939
gitea.com/macaron/session v0.0.0-20190821211443-122c47c5f705/go.mod h1:1ujH0jD6Ca4iK9NL0Q2a7fG2chvXx5hVa7hBfABwpkA=
40-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d h1:XLww3CvnFZkXVwauN67fniDaIpIqsE+9KVcxlZKlvLU=
41-
gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d/go.mod h1:FanKy3WjWb5iw/iZBPk4ggoQT9FcM6bkBPvmDmsH6tY=
40+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e h1:BHoJ/xWNt6FrVsL54JennM9HPIQlnbmRvmaC5DO65pU=
41+
gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e/go.mod h1:FanKy3WjWb5iw/iZBPk4ggoQT9FcM6bkBPvmDmsH6tY=
4242
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7 h1:N9QFoeNsUXLhl14mefLzGluqV7w2mGU3u+iZU+jCeWk=
4343
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7/go.mod h1:kgsbFPPS4P+acDYDOPDa3N4IWWOuDJt5/INKRUz7aks=
4444
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=

modules/session/memory.go

Lines changed: 0 additions & 216 deletions
This file was deleted.

modules/session/virtual.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package session
66

77
import (
8-
"container/list"
98
"encoding/json"
109
"fmt"
1110
"sync"
@@ -37,7 +36,7 @@ func (o *VirtualSessionProvider) Init(gclifetime int64, config string) error {
3736
// This is only slightly more wrong than modules/setting/session.go:23
3837
switch opts.Provider {
3938
case "memory":
40-
o.provider = &MemProvider{list: list.New(), data: make(map[string]*list.Element)}
39+
o.provider = &session.MemProvider{}
4140
case "file":
4241
o.provider = &session.FileProvider{}
4342
case "redis":

vendor/gitea.com/macaron/session/file.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/memory.go

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/mysql/mysql.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/macaron/session/postgres/postgres.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ gitea.com/macaron/inject
3737
# gitea.com/macaron/macaron v1.4.0
3838
## explicit
3939
gitea.com/macaron/macaron
40-
# gitea.com/macaron/session v0.0.0-20191207215012-613cebf0674d
40+
# gitea.com/macaron/session v0.0.0-20200902202411-e3a87877db6e
4141
## explicit
4242
gitea.com/macaron/session
4343
gitea.com/macaron/session/couchbase

0 commit comments

Comments
 (0)