types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICache

type ICache[K comparable, V any] interface {

	// Set stores the given key-value pair in the cache.
	Set(ctx context.Context, key K, value V) error

	// Get retrieves the value associated with the given key from the cache.
	Get(ctx context.Context, key K) (V, error)

	// Delete removes the value associated with the given key from the cache.
	Delete(ctx context.Context, key K) error

	Keys() []K
}

ICache defines an interface for a key-value cache.

Jump to

Keyboard shortcuts

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