()
| 421 | } |
| 422 | |
| 423 | func (s SweepSettings) applyDefaults() SweepSettings { |
| 424 | if s.TouchThreshold == 0 { |
| 425 | s.TouchThreshold = DefaultTouchThreshold |
| 426 | } |
| 427 | |
| 428 | return s |
| 429 | } |
| 430 | |
| 431 | // NewPersistentCache creates the persistent cache in the provided storage. |
| 432 | func NewPersistentCache(ctx context.Context, description string, cacheStorage Storage, storageProtection cacheprot.StorageProtection, sweep SweepSettings, mr *metrics.Registry, timeNow func() time.Time) (*PersistentCache, error) { |
no outgoing calls
no test coverage detected