pub async fn send(&mut self) -> Result<String, SdkError<GetSecretValueError>> {
        if !self.force_refresh {
            if let Some(cache_item) = self.secret_cache.cache.get(&self.secret_id) {
                if !cache_item.is_expired() {
                    return Ok(cache_item.value.clone());
                }
            }
        }

        match self.fetch_secret().await {
            Ok(secret_value) => {
                let cache_item = CacheItem::new(
                    secret_value.clone(),
                    self.secret_cache.config.cache_item_ttl,
                );
                self.secret_cache
                    .cache
                    .put(self.secret_id.clone(), cache_item);
                Ok(secret_value)
            }
            Err(e) => Err(e),
        }
    }
/// Fetches the secret value from the cache.
///
/// If the secret value exists in the cache and hasn't expired it will be immediately returned.
/// The secret will be fetched by calling AWS Secrets Manager and updated in the cache if:
/// - the secret value hasn't been stored in the cache
/// - the secret stored in the cache but has expired
/// - the force_refresh option was provided
///
/// Values are stored in the cache with the cache_item_ttl from the CacheConfig.
Fetches the secret value from the cache.
If the secret value exists in the cache and hasn't expired it will be immediately returned.
The secret will be fetched by calling AWS Secrets Manager and updated in the cache if:
the secret value hasn't been stored in the cache
the secret stored in the cache but has expired
the force_refresh option was provided

Values are stored in the cache with the cache_item_ttl from the CacheConfig.
Fetches the secret value from the cache . If the secret value exists in the cache and hasn ' t expired it will be immediately returned . The secret will be fetched by calling AWS Secrets Manager and updated in the cache if : the secret value hasn ' t been stored in the cache the secret stored in the cache but has expired the force_refresh option was provided Values are stored in the cache with the cache_item_ttl from the CacheConfig .
pub async fn send(&mut self) -> Result<String, SdkError<GetSecretValueError>> {
        if !self.force_refresh {
            if let Some(cache_item) = self.secret_cache.cache.get(&self.secret_id) {
                if !cache_item.is_expired() {
                    return Ok(cache_item.value.clone());
                }
            }
        }
        match self.fetch_secret().await {
            Ok(secret_value) => {
                let cache_item = CacheItem::new(
                    secret_value.clone(),
                    self.secret_cache.config.cache_item_ttl,
                );
                self.secret_cache
                    .cache
                    .put(self.secret_id.clone(), cache_item);
                Ok(secret_value)
            }
            Err(e) => Err(e),
        }
    }
pub async fn send ( & mut self ) -> Result < String , SdkError < GetSecretValueError > > { if ! self . force_refresh { if let Some ( cache_item ) = self . secret_cache . cache . get ( & self . secret_id ) { if ! cache_item . is_expired ( ) { return Ok ( cache_item . value . clone ( ) ) ; } } } match self . fetch_secret ( ) . await { Ok ( secret_value ) => { let cache_item = CacheItem :: new ( secret_value . clone ( ) , self . secret_cache . config . cache_item_ttl , ) ; self . secret_cache . cache . put ( self . secret_id . clone ( ) , cache_item ) ; Ok ( secret_value ) } Err ( e ) => Err ( e ) , } }
Fetches the secret value from the cache.
Fetches the secret value from the cache .
&mut self
&mut self