mirror of
https://github.com/gofiber/storage.git
synced 2025-10-01 06:42:18 +08:00
📦 Fix expiration checks
Affects memory, postgres and sqlite3 drivers
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user