cache

package
v0.0.0-...-e8be2bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[K skiplist.Key, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K skiplist.Key, V any]() *Cache[K, V]

func (*Cache[K, V]) Get

func (cache *Cache[K, V]) Get(_ context.Context, key K) (V, error)

func (*Cache[K, V]) Seq

func (cache *Cache[K, V]) Seq(_ context.Context, afterKey K, size int) ([]V, error)

func (*Cache[K, V]) Set

func (cache *Cache[K, V]) Set(_ context.Context, key K, val V) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL