secure cookies mismatch when session use file db
// SetupSessions initializes the sessions, optionally.
func (app *Application) SetupSessions(expires time.Duration, cookieHashKey, cookieBlockKey []byte) {
// session start
db, _ := file.New("./bootstrap/cache/session", 0666)
// use different go routines to sync the database
db.Async(true)
app.Sessions = sessions.New(sessions.Config{
Cookie: "SECRET_SESS_COOKIE_" + config.AppConfig.AppName,
Expires: expires,
Encoding: securecookie.New(cookieHashKey, cookieBlockKey),
})
app.Sessions.UseDatabase(db)
}

The database stores the session id, the secure cookie is for client(browser) usage. If you run the example it's working, actually we're using this stack, the sessiondb and secure cookie package work like a charm together, what's the problem exactly?
@esemplastic hmmm sorry my english is very poor,
The issue is when i use secure cookies , seesion file name dosent match stored at cookies seesion id . But when i use unsecure cookies they are matched, like this :


@motecshine They supposed to not match, that's the reason you use the securecookie and Encoding feature: the client has a different session id inside its cookie than your server's store but they matched as expected because the encoding/decoding happens between validation.
sorry my english is very poor,
It's not a problem, don't worry. However, If you still don't understand how they work and you're willing to learn (you're not supposed to know, iris handles these kind of stuff for you) you'll find a lot of online resources to read and learn from at your own language, just search via engines like google, yahoo and e.t.c.