schemacaching

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatastoreProxyTestCache

func DatastoreProxyTestCache(t testing.TB) cache.Cache[cache.StringKey, CacheEntry]

DatastoreProxyTestCache returns a cache used for testing.

func NewCachingDatastoreProxy

func NewCachingDatastoreProxy(delegate datastore.Datastore, c cache.Cache[cache.StringKey, CacheEntry], gcWindow time.Duration, cachingMode CachingMode, watchHeartbeat time.Duration) datastore.Datastore

NewCachingDatastoreProxy creates a new datastore proxy which caches definitions that are loaded at specific datastore revisions.

func NewDefinitionCachingProxy added in v1.54.0

func NewDefinitionCachingProxy(delegate datastore.Datastore, c cache.Cache[cache.StringKey, *cacheEntry]) *definitionCachingProxy

func NewWatchingCacheProxy added in v1.54.0

func NewWatchingCacheProxy(delegate datastore.Datastore, fallbackCache *definitionCachingProxy, gcWindow time.Duration, watchHeartbeat time.Duration) *watchingCachingProxy

NewWatchingCacheProxy creates and returns a watching cache proxy.

Types

type CacheEntry added in v1.35.1

type CacheEntry = *cacheEntry

type CachingMode

type CachingMode int

CachingMode is the caching mode to use for schema.

const (
	// WatchIfSupported will use a schema watch-based cache, if caching is supported. Otherwise,
	// it will fallback to just-in-time caching.
	WatchIfSupported CachingMode = iota

	// JustInTimeCaching will always use a just-in-time cache for schema.
	JustInTimeCaching
)

Jump to

Keyboard shortcuts

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