(expirationConfig map[CacheType]time.Duration)
| 45 | } |
| 46 | |
| 47 | func NewStorageCache(expirationConfig map[CacheType]time.Duration) *StorageCache { |
| 48 | return &StorageCache{ |
| 49 | expirationConfig, |
| 50 | cache.New(defaultCacheExpiration, defaultCacheCleanupInterval), |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | func DefaultCacheExpirationConfigs() map[CacheType]time.Duration { |
| 55 | conf := make(map[CacheType]time.Duration, 0) |