cache

package
v0.0.0-...-5e5ceee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushObjectCaches

func FlushObjectCaches()

FlushObjectCaches flushes all object caches.

func RemoveCache

func RemoveCache(name string)

RemoveCache removes the object Cache with the give name.

func RemoveObject

func RemoveObject(name, objHash string)

RemoveObject removes object with objHash in the Cache with the given name from the object Cache.

Types

type ObjectCache

type ObjectCache struct {
	// Cache is a cache keyed by object Hash() function.
	Cache map[string]*object.K8sObject
	Mu    *sync.RWMutex
}

ObjectCache is a cache of objects,

func GetCache

func GetCache(name string) *ObjectCache

GetCache returns the object Cache for the given name, creating one in the global Cache if needed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL