feature: expired sessions can be deleted via a background goroutine.
- Call defer store.StopCleanup(store.Cleanup(time.Minute * 5)) after store creation. - Does not break the existing API (optional, but recommended) - Based on https://github.com/yosssi/boltstore/reaper - Deletes expired sessions (where expireson > now()) - Includes tests
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
package pgstore
|
||||
|
||||
import (
|
||||
"github.com/gorilla/securecookie"
|
||||
"github.com/gorilla/sessions"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/gorilla/securecookie"
|
||||
"github.com/gorilla/sessions"
|
||||
)
|
||||
|
||||
type headerOnlyResponseWriter http.Header
|
||||
|
Reference in New Issue
Block a user