cache

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager[K comparable, V any] interface {
	Load(key K) Ref[V]
	Delete(key K) bool
	Cleanup() int
	Len() int
}

func NewManager

func NewManager[K comparable, V any](storage Storage[K, V]) Manager[K, V]

type Ref

type Ref[T any] interface {
	futures.Future[T]
	Release()
}

type Storage

type Storage[K comparable, V any] interface {
	Get(key K) (V, error)
	Delete(key K, value V) error
}

Jump to

Keyboard shortcuts

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