Struct aws_secretsmanager_cache::CacheConfig
source · [−]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: usizeThe 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: u128The 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: StringThe 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
Auto Trait Implementations
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnwindSafe for CacheConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
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