mirror of
https://github.com/kataras/iris.git
synced 2025-12-27 14:57:05 +00:00
Former-commit-id: 4324e81ea94ef917ce39005b6038a6819bb63258
This commit is contained in:
@@ -55,6 +55,12 @@ func (db *Database) Acquire(sid string, expires time.Duration) sessions.LifeTime
|
||||
return sessions.LifeTime{Time: time.Now().Add(time.Duration(seconds) * time.Second)}
|
||||
}
|
||||
|
||||
// OnUpdateExpiration will re-set the database's session's entry ttl.
|
||||
// https://redis.io/commands/expire#refreshing-expires
|
||||
func (db *Database) OnUpdateExpiration(sid string, newExpires time.Duration) error {
|
||||
return db.redis.UpdateTTLMany(sid, int64(newExpires.Seconds()))
|
||||
}
|
||||
|
||||
const delim = "_"
|
||||
|
||||
func makeKey(sid, key string) string {
|
||||
|
||||
Reference in New Issue
Block a user