ctxcache

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReleaseCacheBlock

func ReleaseCacheBlock(ctx context.Context)

func WithCacheBlock

func WithCacheBlock(ctx context.Context) context.Context

Types

type Cacher

type Cacher interface {
	Get(key any) any
	GetOrCache(key any, fn func(key any) (any, error)) (any, error)
	Set(key any, value any)
	Release()
}

func GetCache

func GetCache(ctx context.Context, key any) Cacher

Jump to

Keyboard shortcuts

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