MCPcopy
hub / github.com/rclone/rclone / New

Function New

lib/cache/cache.go:23–31  ·  view source on GitHub ↗

New creates a new cache with the default expire duration and interval

()

Source from the content-addressed store, hash-verified

21
22// New creates a new cache with the default expire duration and interval
23func New() *Cache {
24 return &Cache{
25 cache: map[string]*cacheEntry{},
26 expireRunning: false,
27 expireDuration: 300 * time.Second,
28 expireInterval: 60 * time.Second,
29 finalize: func(_ any) {},
30 }
31}
32
33// SetExpireDuration sets the interval at which things expire
34//

Callers 7

NewFsFunction · 0.92
NewFsFunction · 0.92
createOnFirstUseFunction · 0.92
setupFunction · 0.70
TestDeletePrefixFunction · 0.70
TestCacheRenameFunction · 0.70
TestCacheFinalizeFunction · 0.70

Calls

no outgoing calls

Tested by 4

setupFunction · 0.56
TestDeletePrefixFunction · 0.56
TestCacheRenameFunction · 0.56
TestCacheFinalizeFunction · 0.56