1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

fixed redis inband ttl handling

This commit is contained in:
Annika Hannig 2020-10-28 16:13:58 +01:00
parent 990d85c41d
commit 98faa6ccc4
No known key found for this signature in database
GPG key ID: 62E226E47DDCE58D

View file

@ -53,8 +53,8 @@ func (self *RedisCache) Get(key string) (Parsed, error) {
if err != nil {
return NilParse, fmt.Errorf("invalid TTL value for key: %s", key)
}
if ttl.Before(time.Now()) {
// Deal with the inband TTL if present
if !ttl.Equal(time.Time{}) && ttl.Before(time.Now()) {
return NilParse, err // TTL expired
}