cache

package
v0.0.0-...-b14404a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	TTL time.Duration
	// contains filtered or unexported fields
}

func NewKey

func NewKey(key string, ttl time.Duration) *Key

func (Key) Format

func (k Key) Format(args ...any) string

type TypedKey

type TypedKey[T any] struct {
	TTL time.Duration
	// contains filtered or unexported fields
}

func NewTypedKey

func NewTypedKey[T any](key string, ttl time.Duration) *TypedKey[T]

func (TypedKey[T]) Format

func (k TypedKey[T]) Format(v T) string

Jump to

Keyboard shortcuts

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