

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 輸入 CacheConfig
<a name="retrieving-secrets_cache-go_CacheConfig"></a>

[快取](retrieving-secrets_cache-go_cache.md)的快取組態選項，例如最大快取大小、預設[版本階段](whats-in-a-secret.md#term_version)和快取秘密的存留時間 (TTL)。

```
type CacheConfig struct {

    // The maximum cache size. The default is 1024 secrets.
    MaxCacheSize int
            
    // The TTL of a cache item in nanoseconds. The default is 
    // 3.6e10^12 ns or 1 hour.
    CacheItemTTL int64
            
    // The version of secrets that you want to cache. The default 
    // is "AWSCURRENT".
    VersionStage string
            
    // Used to hook in-memory cache updates.
    Hook CacheHook
}
```