()
| 52 | } |
| 53 | |
| 54 | func DefaultCacheExpirationConfigs() map[CacheType]time.Duration { |
| 55 | conf := make(map[CacheType]time.Duration, 0) |
| 56 | conf[CacheTypeFunction] = defaultCacheExpiration |
| 57 | conf[CacheTypeAlias] = defaultCacheExpiration |
| 58 | conf[CacheTypeRuntime] = defaultCacheExpiration |
| 59 | return conf |
| 60 | } |
| 61 | |
| 62 | func (s *StorageCache) CacheExpiration(cacheType CacheType) time.Duration { |
| 63 | if time, ok := s.cacheExpirationConfigs[cacheType]; ok { |