MCPcopy
hub / github.com/rclone/rclone / SetExpireDuration

Method SetExpireDuration

lib/cache/cache.go:36–39  ·  view source on GitHub ↗

SetExpireDuration sets the interval at which things expire If it is less than or equal to 0 then things are never cached

(d time.Duration)

Source from the content-addressed store, hash-verified

34//
35// If it is less than or equal to 0 then things are never cached
36func (c *Cache) SetExpireDuration(d time.Duration) *Cache {
37 c.expireDuration = d
38 return c
39}
40
41// returns true if we aren't to cache anything
42func (c *Cache) noCache() bool {

Callers 2

TestCacheNoExpireFunction · 0.80
createOnFirstUseFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestCacheNoExpireFunction · 0.64