Skip to content

Commit

Permalink
Remove Redis TTL (#1696)
Browse files Browse the repository at this point in the history
* Remove Redis TTL

Prior to sccache 0.4.x there was no per key TTL applied to Redis. Long
term we probably want to make this configurable, but for now restoring
the initial behavior of letting Redis control when the keys expire.

* Removed unused duration
  • Loading branch information
eandersson committed Mar 28, 2023
1 parent 9df846e commit fe99e64
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/cache/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use opendal::layers::LoggingLayer;
use opendal::services::Redis;
use opendal::Operator;
use std::collections::HashMap;
use std::time::Duration;
use url::Url;

/// A cache that stores entries in a Redis.
Expand All @@ -33,8 +32,6 @@ impl RedisCache {
builder.endpoint(parsed.as_str());
builder.username(parsed.username());
builder.password(parsed.password().unwrap_or_default());
// Set default ttl to 24 hours.
builder.default_ttl(Duration::from_secs(24 * 3600));

let options: HashMap<_, _> = parsed
.query_pairs()
Expand Down

0 comments on commit fe99e64

Please sign in to comment.