1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

Sessions are now in full sync with the registered database, on acquire(init), set, get, delete, clear, visit, len, release(destroy) as requested by almost everyone. https://github.com/kataras/iris/issues/969

Former-commit-id: 49fcdb93106a78f0a24ad3fb4d8725e35e98451a
This commit is contained in:
Gerasimos Maropoulos
2018-04-22 13:52:36 +03:00
parent f113872b7d
commit b62080c4bb
28 changed files with 496 additions and 1358 deletions

View File

@@ -63,3 +63,9 @@ func (lt *LifeTime) HasExpired() bool {
return lt.Time.Before(time.Now())
}
// DurationUntilExpiration returns the duration until expires, it can return negative number if expired,
// a call to `HasExpired` may be useful before calling this `Dur` function.
func (lt *LifeTime) DurationUntilExpiration() time.Duration {
return time.Until(lt.Time)
}