Documentation ¶
Overview ¶
Package ristretto provides a cache service using in-memory implementation of dgraph-io/ristretto.
Index ¶
- type Cacher
- func (c *Cacher[K, V]) Close(ctx context.Context) error
- func (c *Cacher[K, V]) Delete(ctx context.Context, k K) error
- func (c *Cacher[K, V]) Get(ctx context.Context, k K) (rs V, err error)
- func (c *Cacher[K, V]) Open(ctx context.Context) error
- func (c *Cacher[K, V]) Set(ctx context.Context, k K, v V, opts ...cache.SetOption) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher[K comparable, V any] struct { // contains filtered or unexported fields }
Cacher is an in-memory cache implementation using dgraph-io/ristretto cache.
func New ¶
func New[K comparable, V any](conf *Config) *Cacher[K, V]
Click to show internal directories.
Click to hide internal directories.