memorycache

package
v0.0.0-...-31d061a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(key string)

Delete a value from cache

func Get

func Get[V any](key string) (result V, success bool)

Get retrieve a value from cache

func GetOrSet

func GetOrSet[T any](ctx context.Context, key string, factory func(ctx context.Context) (T, error), opts ...cache.ItemOption) (T, error)

GetOrSet a value with a lock

func Set

func Set[V any](key string, value V, opts ...cache.ItemOption)

Set return a value from cache

Types

This section is empty.

Jump to

Keyboard shortcuts

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