MCPcopy
hub / github.com/flyteorg/flyte / NewAutoRefreshBatchedCache

Function NewAutoRefreshBatchedCache

flytestdlib/cache/in_memory_auto_refresh.go:407–410  ·  view source on GitHub ↗

Instantiates a new AutoRefresh Cache that syncs items in batches.

(name string, createBatches CreateBatchesFunc, syncCb SyncFunc, syncRateLimiter workqueue.TypedRateLimiter[*Batch],
	resyncPeriod time.Duration, parallelizm, size uint, scope promutils.Scope)

Source from the content-addressed store, hash-verified

405
406// Instantiates a new AutoRefresh Cache that syncs items in batches.
407func NewAutoRefreshBatchedCache(name string, createBatches CreateBatchesFunc, syncCb SyncFunc, syncRateLimiter workqueue.TypedRateLimiter[*Batch],
408 resyncPeriod time.Duration, parallelizm, size uint, scope promutils.Scope) (AutoRefresh, error) {
409 return NewInMemoryAutoRefresh(name, syncCb, syncRateLimiter, resyncPeriod, parallelizm, size, scope, WithCreateBatchesFunc(createBatches))
410}
411
412// Instantiates a new AutoRefresh Cache that syncs items periodically.
413func NewAutoRefreshCache(name string, syncCb SyncFunc, syncRateLimiter workqueue.TypedRateLimiter[*Batch], resyncPeriod time.Duration,

Callers 1

NewAutoRefreshCacheFunction · 0.70

Calls 2

NewInMemoryAutoRefreshFunction · 0.85
WithCreateBatchesFuncFunction · 0.85

Tested by

no test coverage detected