Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCache ¶
func RegisterCache(reg CacheRegistration)
init() is serialized by Go, but the mutex covers consumers that register concurrently
func RegisteredCacheNames ¶
func RegisteredCacheNames() []string
Types ¶
type CacheDeps ¶ added in v0.11.0
type CacheDeps struct {
ErrorMessages config.ErrorMessages
Datastores datastore.DatastoreRegistry
}
New dependencies are added as fields so the Initialize signature stays stable
type CacheRegistration ¶
type CacheRegistration interface {
Name() string
Initialize(config any, deps CacheDeps) (Cache, error)
InitializeConfig() any
}
func RegisteredCache ¶
func RegisteredCache(name string) (CacheRegistration, bool)
type CacheRegistry ¶ added in v0.12.0
Gives entities access to the caches configured by ID
type Decorator ¶ added in v0.13.0
type Decorator interface {
Unwrap() Cache
}
Caches wrapping another without storing anything, so capability checks see through them
type Parent ¶ added in v0.13.0
type Parent interface {
Children() []Cache
}
Caches that nest others. Children returns them in configuration order
type PerIdentity ¶ added in v0.13.0
type PerIdentity interface {
KeyedByIdentity() bool
}
Caches whose entries vary by requester
Click to show internal directories.
Click to hide internal directories.