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:
parent
990d85c41d
commit
98faa6ccc4
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue