Skip to main content

build_default_store

Function build_default_store 

Source
pub fn build_default_store(cache_ttl_secs: u64) -> Box<dyn CredentialStore>
Expand description

Build the default credential chain, optionally wrapping the whole thing in a TTL cache. Call this from host binaries (CLI, MCP server entrypoint) so the cache configuration stays consistent.

  • cache_ttl_secs == 0 → no cache, returns the raw ChainStore.
  • cache_ttl_secs > 0 → wraps in CachedStore with the requested TTL.