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

Method InvalidateCacheRefs

core/api.go:293–302  ·  view source on GitHub ↗

InvalidateCacheRefs invalidates response-cache entries associated with the supplied dependency refs. It is a no-op when response caching is disabled.

(ctx context.Context, refs []RowRef)

Source from the content-addressed store, hash-verified

291// InvalidateCacheRefs invalidates response-cache entries associated with the
292// supplied dependency refs. It is a no-op when response caching is disabled.
293func (g *GraphJin) InvalidateCacheRefs(ctx context.Context, refs []RowRef) error {
294 gj, err := g.getEngine()
295 if err != nil {
296 return err
297 }
298 if gj.responseCache == nil || len(refs) == 0 {
299 return nil
300 }
301 return gj.responseCache.InvalidateRows(ctx, refs)
302}
303
304// Close stops GraphJin background tasks. It is safe to call multiple times.
305func (g *GraphJin) Close() {

Callers 1

Calls 2

getEngineMethod · 0.95
InvalidateRowsMethod · 0.65

Tested by 1