📦 Fix expiration checks

Affects memory, postgres and sqlite3 drivers
This commit is contained in:
Tom
2020-11-01 13:33:57 +00:00
parent fa1e1591bb
commit 23a3640cfb
3 changed files with 3 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ func (s *Storage) Get(key string) ([]byte, error) {
}
// If the expiration time has already passed, then return nil
if time.Now().After(time.Unix(exp, 0)) {
if exp <= time.Now().Unix() && exp != 0 {
return nil, nil
}