MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / resetCacheState

Function resetCacheState

internal/cache/cache_test.go:105–113  ·  view source on GitHub ↗

resetCacheState resets package-level cache state for isolated testing.

()

Source from the content-addressed store, hash-verified

103
104// resetCacheState resets package-level cache state for isolated testing.
105func resetCacheState() {
106 globalCache = nil
107 cacheLogger = nil
108 globalCacheDir = ""
109 once = sync.Once{}
110 cacheLoggerOnce = sync.Once{}
111 namespacedCaches = make(map[string]Cache)
112 namespacedCacheMu = sync.RWMutex{}
113}
114
115// TestNamespacedCacheIsolation verifies that namespaced caches are not affected by clearing the global cache.
116func TestNamespacedCacheIsolation(t *testing.T) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected