diff --git a/const.go b/const.go index cee1d94..6f45fa3 100644 --- a/const.go +++ b/const.go @@ -14,3 +14,4 @@ const defaultCookieLen uint32 = 32 // If set the cookie expiration when the browser is closed (-1), set the expiration as a keep alive (2 days) // so as not to keep dead sessions for a long time const keepAliveExpiration = 2 * 24 * time.Hour +const expirationAttrKey = "__store:expiration__" diff --git a/store.go b/store.go index eab11a8..6c38d7a 100644 --- a/store.go +++ b/store.go @@ -1,14 +1,9 @@ package session import ( - "fmt" "time" - - "github.com/savsgio/gotils/bytes" ) -var expirationAttrKey = fmt.Sprintf("__store:expiration:%s__", bytes.Rand(make([]byte, 5))) - // NewStore returns a new empty store func NewStore() *Store { return &Store{