DefaultCacheConfig 默认缓存配置
()
| 43 | |
| 44 | // DefaultCacheConfig 默认缓存配置 |
| 45 | func DefaultCacheConfig() *CacheConfig { |
| 46 | return &CacheConfig{ |
| 47 | Enabled: false, |
| 48 | Strategy: CacheStrategyMemory, |
| 49 | TTL: 1 * time.Hour, |
| 50 | CacheDir: ".cache/tools", |
| 51 | MaxMemoryItems: 1000, |
| 52 | MaxFileSize: 10 * 1024 * 1024, // 10MB |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // CacheEntry 缓存条目 |
| 57 | type CacheEntry struct { |
no outgoing calls