auth_proxy: non-negative cache TTL (#17495)

fixes setex error with redis on #17377
This commit is contained in:
Kyle Brandt 2019-06-10 15:25:23 +02:00 committed by GitHub
parent 591ea0bfe3
commit 826d33ea37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,7 +292,7 @@ func (auth *AuthProxy) Remember(id int64) *Error {
return nil
}
expiration := time.Duration(-auth.cacheTTL) * time.Minute
expiration := time.Duration(auth.cacheTTL) * time.Minute
err := auth.store.Set(key, id, expiration)
if err != nil {