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

Interface AutoRefreshCache

flytestdlib/utils/auto_refresh_cache.go:19–28  ·  view source on GitHub ↗

AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides callbacks for create, refresh and delete item. The cache doesn't provide apis to update items. Deprecated: This utility is deprecated, it has been refactored and moved into `cache` packag

Source from the content-addressed store, hash-verified

17// The cache doesn't provide apis to update items.
18// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package.
19type AutoRefreshCache interface {
20 // starts background refresh of items
21 Start(ctx context.Context)
22
23 // Get item by id if exists else null
24 Get(id string) CacheItem
25
26 // Get object if exists else create it
27 GetOrCreate(item CacheItem) (CacheItem, error)
28}
29
30// Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package.
31type CacheItem interface {

Callers 16

Test_monitorFunction · 0.95
TestCacheTwoFunction · 0.95
TestCacheTwoFunction · 0.95
GetMethod · 0.65
GetOrCreateMethod · 0.65
Test_monitorFunction · 0.95

Implementers 15

InMemoryAutoRefreshflytestdlib/cache/in_memory_auto_refre
AutoRefreshflytestdlib/cache/mocks/mocks.go
AutoRefresh_Expecterflytestdlib/cache/mocks/mocks.go
autoRefreshCacheflytestdlib/utils/auto_refresh_cache.g
autoRefreshflytestdlib/autorefreshcache/auto_refr
AutoRefreshflytestdlib/autorefreshcache/mocks/moc
AutoRefresh_Expecterflytestdlib/autorefreshcache/mocks/moc
AutoRefreshWithUpdateflytestdlib/autorefreshcache/mocks/moc
AutoRefreshWithUpdate_Expecterflytestdlib/autorefreshcache/mocks/moc
AutoRefreshflytestdlib/flytestdlib/cache/mocks/mo
AutoRefresh_Expecterflytestdlib/flytestdlib/cache/mocks/mo
AutoRefreshflytestdlib/flytestdlib/autorefreshcac

Calls

no outgoing calls

Tested by

no test coverage detected