cache

package
v1.96.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAggregator

func NewAggregator(fallbackCache cache.Cache, gvkToCache map[schema.GroupVersionKind]cache.Cache, scheme *runtime.Scheme) cache.Cache

NewAggregator creates a new instance of an aggregated cache.

func NewSingleObject added in v1.67.0

func NewSingleObject(
	log logr.Logger,
	restConfig *rest.Config,
	newCache cache.NewCacheFunc,
	opts cache.Options,
	gvk schema.GroupVersionKind,
	clock clock.Clock,
	maxIdleTime time.Duration,
	garbageCollectionInterval time.Duration,
) cache.Cache

NewSingleObject creates a new instance of the singleObject cache.Cache implementation. This cache maintains a separate cache per `client.ObjectKey` and invalidates them when not accessed for the given `maxIdleTime`. A new cache for a particular object is added or re-added as soon as the caches `Get()` function is invoked. Please note that object types are not differentiated by this cache (only object keys), i.e. it must not be used with mixed GVKs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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