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

Function GetGlobalCache

internal/cache/cache.go:475–482  ·  view source on GitHub ↗

GetGlobalCache returns the global cache instance.

()

Source from the content-addressed store, hash-verified

473
474// GetGlobalCache returns the global cache instance.
475func GetGlobalCache() Cache {
476 if globalCache == nil {
477 // If global cache is not initialized, use a temporary in-memory cache
478 globalCache = NewMemoryCache()
479 }
480
481 return globalCache
482}
483
484// GetBadgerCache returns the global cache as a BadgerCache if applicable.
485func GetBadgerCache() (*BadgerCache, bool) {

Callers 3

NewCacheAdapterFunction · 0.92
GetBadgerCacheFunction · 0.85

Calls 1

NewMemoryCacheFunction · 0.85

Tested by 1