diff --git a/src/simple_cache_client.rs b/src/simple_cache_client.rs index c31ad194..75e35131 100644 --- a/src/simple_cache_client.rs +++ b/src/simple_cache_client.rs @@ -97,6 +97,12 @@ impl SimpleCacheClientBuilder { } } + pub fn default_ttl_seconds(mut self, seconds: NonZeroU64) -> Result { + utils::is_ttl_valid(&seconds)?; + self.default_ttl_seconds = seconds; + Ok(self) + } + pub fn build(self) -> SimpleCacheClient { let control_interceptor = InterceptedService::new( self.control_channel,