MCPcopy
hub / github.com/open-policy-agent/gatekeeper / wipeData

Method wipeData

pkg/cachemanager/cachemanager.go:362–372  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

360}
361
362func (c *CacheManager) wipeData(ctx context.Context) error {
363 if _, err := c.cfClient.RemoveData(ctx, target.WipeData()); err != nil {
364 return err
365 }
366
367 // reset sync cache before sending the metric
368 c.syncMetricsCache.ResetCache()
369 c.syncMetricsCache.ReportSync()
370
371 return nil
372}
373
374func (c *CacheManager) ReportSyncMetrics() {
375 c.syncMetricsCache.ReportSync()

Callers 1

wipeCacheIfNeededMethod · 0.95

Calls 3

ResetCacheMethod · 0.80
RemoveDataMethod · 0.65
ReportSyncMethod · 0.45

Tested by

no test coverage detected