Documentation
¶
Index ¶
- func NewCache(cli cache.Client, cacheOpts CacheOptions, cacheConfig *options.Options) cache.Cache
- type CacheOptions
- type Manager
- func (cm *Manager) Configuration() *options.Options
- func (cm *Manager) Connect() error
- func (cm *Manager) Locker() locks.NamedLocker
- func (cm *Manager) Remove(cacheKeys ...string) error
- func (cm *Manager) Retrieve(cacheKey string) ([]byte, status.LookupStatus, error)
- func (cm *Manager) RetrieveReference(cacheKey string) (any, status.LookupStatus, error)
- func (cm *Manager) SetLocker(l locks.NamedLocker)
- func (cm *Manager) Store(cacheKey string, byteData []byte, ttl time.Duration) error
- func (cm *Manager) StoreReference(cacheKey string, data cache.ReferenceObject, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheOptions ¶
type CacheOptions struct {
UseIndex bool
IndexCliOpts index.IndexedClientOptions
}
Provide initialization options to the Manager / cache.Cache creation
type Manager ¶
Manager implements the cache.Cache interface for Trickster, providing an abstracted cache layer with metrics, locking, and optional index / LRU-key-reaper.
func (*Manager) Configuration ¶
func (*Manager) Locker ¶
func (cm *Manager) Locker() locks.NamedLocker
func (*Manager) RetrieveReference ¶
func (*Manager) SetLocker ¶
func (cm *Manager) SetLocker(l locks.NamedLocker)
func (*Manager) StoreReference ¶
Click to show internal directories.
Click to hide internal directories.