MCPcopy
hub / github.com/rclone/rclone / SetExpireInterval

Method SetExpireInterval

lib/cache/cache.go:49–55  ·  view source on GitHub ↗

SetExpireInterval sets the interval at which the cache expiry runs Set to 0 or a -ve number to disable

(d time.Duration)

Source from the content-addressed store, hash-verified

47//
48// Set to 0 or a -ve number to disable
49func (c *Cache) SetExpireInterval(d time.Duration) *Cache {
50 if d <= 0 {
51 d = 100 * 365 * 24 * time.Hour
52 }
53 c.expireInterval = d
54 return c
55}
56
57// cacheEntry is stored in the cache
58type cacheEntry struct {

Callers 2

TestCacheExpireFunction · 0.80
createOnFirstUseFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestCacheExpireFunction · 0.64