Documentation
¶
Index ¶
- func DatastoreProxyTestCache(t testing.TB) cache.Cache[cache.StringKey, CacheEntry]
- func MustNewDefinitionCachingProxy(delegate datastore.Datastore, c cache.Cache[cache.StringKey, *cacheEntry]) *definitionCachingProxy
- func NewCachingDatastoreProxy(delegate datastore.Datastore, c cache.Cache[cache.StringKey, CacheEntry], ...) datastore.Datastore
- func NewWatchingCacheProxy(delegate datastore.Datastore, fallbackCache *definitionCachingProxy, ...) *watchingCachingProxy
- type CacheEntry
- type CachingMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatastoreProxyTestCache ¶
DatastoreProxyTestCache returns a cache used for testing.
func MustNewDefinitionCachingProxy ¶ added in v1.56.2
func MustNewDefinitionCachingProxy(delegate datastore.Datastore, c cache.Cache[cache.StringKey, *cacheEntry]) *definitionCachingProxy
The caller MUST call Close on the returned proxy when it is no longer needed.
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. The caller MUST call Close on the returned proxy when it is no longer needed.
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 )
Click to show internal directories.
Click to hide internal directories.