Skip to content

Commit

Permalink
Add ttl
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
  • Loading branch information
dgzlopes committed Nov 23, 2020
1 parent 13ee118 commit fe07957
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tempodb/backend/redis/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func New(nextReader backend.Reader, nextWriter backend.Writer, cfg *Config, logg
if cfg.ClientConfig.Timeout == 0 {
cfg.ClientConfig.Timeout = 100 * time.Millisecond
}
if cfg.ClientConfig.Expiration == 0 {
cfg.ClientConfig.Expiration = cfg.TTL
}

client := cache.NewRedisClient(&cfg.ClientConfig)

Expand Down

0 comments on commit fe07957

Please sign in to comment.