MCPcopy Index your code
hub / github.com/coder/coder / Acquire

Method Acquire

coderd/files/cache_internal_test.go:17–23  ·  view source on GitHub ↗
(ctx context.Context, db database.Store, fileID uuid.UUID)

Source from the content-addressed store, hash-verified

15}
16
17func (c *LeakCache) Acquire(ctx context.Context, db database.Store, fileID uuid.UUID) (*CloseFS, error) {
18 // We need to call prepare first to both 1. leak a reference and 2. prevent
19 // the behavior of immediately closing on an error (as implemented in Acquire)
20 // from freeing the file.
21 c.prepare(db, fileID)
22 return c.Cache.Acquire(ctx, db, fileID)
23}

Callers 1

Calls 2

AcquireMethod · 0.65
prepareMethod · 0.45

Tested by

no test coverage detected