resetCacheState resets package-level cache state for isolated testing.
()
| 103 | |
| 104 | // resetCacheState resets package-level cache state for isolated testing. |
| 105 | func 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. |
| 116 | func TestNamespacedCacheIsolation(t *testing.T) { |
no outgoing calls
no test coverage detected