Struct aws_secretsmanager_cache::CacheConfig[][src]

pub struct CacheConfig {
    pub max_cache_size: usize,
    pub cache_item_ttl: u128,
    pub version_stage: String,
}
Expand description

Configuration options for the SecretCache.

Defaults:

  • max_cache_size: 1024
  • cache_item_ttl: 3600000000000 (1hr)
  • version_stage: “AWSCURRENT”

Fields

max_cache_size: usize

The maximum number of secrets to maintain in the cache.

The least frequently accessed items will be evicted from the cache once a max_cache_size number of items are stored.

Default: 1024

cache_item_ttl: u128

The TTL expiry of items in the cache.

Determines the number of nanoseconds a cached secret will be considered valid before the secret value is required to be refreshed. Refreshing happens synchronously.

Default: 3600000000000 (1 hour in nanoseconds)

version_stage: String

The version stage used when requesting secrets from AWS Secrets Manager.

Default: “AWSCURRENT”

Implementations

Returns a new Cache Configuration with default values set.

Defaults:

  • max_cache_size: 1024
  • cache_item_ttl: 3600000000000 (1hr)
  • version_stage: “AWSCURRENT”

Sets the max_cache_size cache configuration option to a different value.

Sets the cache_item_ttl cache configuration option to a different value.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more