MCPcopy Index your code
hub / github.com/rclone/rclone / NewMemory

Function NewMemory

backend/cache/storage_memory.go:22–30  ·  view source on GitHub ↗

NewMemory builds this cache storage defaultExpiration will set the expiry time of chunks in this storage

(defaultExpiration time.Duration)

Source from the content-addressed store, hash-verified

20// NewMemory builds this cache storage
21// defaultExpiration will set the expiry time of chunks in this storage
22func NewMemory(defaultExpiration time.Duration) *Memory {
23 mem := &Memory{}
24 err := mem.Connect(defaultExpiration)
25 if err != nil {
26 fs.Errorf("cache", "can't open ram connection: %v", err)
27 }
28
29 return mem
30}
31
32// Connect will create a connection for the storage
33func (m *Memory) Connect(defaultExpiration time.Duration) error {

Callers 1

NewObjectHandleFunction · 0.85

Calls 2

ConnectMethod · 0.95
ErrorfFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…