Documentation
¶
Overview ¶
Package memory is the memory implementation of the Trickster Cache and uses ristretto (TinyLFU admission-controlled cache) to manage cache objects
Index ¶
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) Connect() error
- func (c *Cache) Remove(cacheKeys ...string) error
- func (c *Cache) Retrieve(cacheKey string) ([]byte, status.LookupStatus, error)
- func (c *Cache) RetrieveReference(cacheKey string) (any, status.LookupStatus, error)
- func (c *Cache) Store(cacheKey string, data []byte, ttl time.Duration) error
- func (c *Cache) StoreReference(cacheKey string, data cache.ReferenceObject, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache defines a Memory Cache client that conforms to the Cache interface
func (*Cache) Retrieve ¶
Retrieve looks for an object in cache and returns it (or an error if not found)
func (*Cache) RetrieveReference ¶
RetrieveReference looks for an object in cache and returns it (or an error if not found)
func (*Cache) StoreReference ¶
func (c *Cache) StoreReference(cacheKey string, data cache.ReferenceObject, ttl time.Duration) error
StoreReference stores an object directly to the memory cache without requiring serialization
Click to show internal directories.
Click to hide internal directories.