MCPcopy
hub / github.com/dosco/graphjin / Put

Method Put

core/fstable_cache.go:34–40  ·  view source on GitHub ↗
(ctx context.Context, key string, body io.Reader, meta fstable.PutMeta)

Source from the content-addressed store, hash-verified

32}
33
34func (b cacheInvalidatingFilesystemBackend) Put(ctx context.Context, key string, body io.Reader, meta fstable.PutMeta) (fstable.Entry, error) {
35 entry, err := b.backend.Put(ctx, key, body, meta)
36 if err == nil && b.cache != nil {
37 _ = b.cache.InvalidateRows(ctx, FilesystemKeyRefs(b.name, entry.Key))
38 }
39 return entry, err
40}
41
42func (b cacheInvalidatingFilesystemBackend) Delete(ctx context.Context, key string) error {
43 err := b.backend.Delete(ctx, key)

Callers

nothing calls this directly

Calls 3

FilesystemKeyRefsFunction · 0.85
PutMethod · 0.65
InvalidateRowsMethod · 0.65

Tested by

no test coverage detected