cache

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 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 Cache

type Cache[T any] interface {
	Get(key string) (*T, error)
	Set(key string, value T, expiration time.Duration) error
	SetNX(key string, value T, expiration time.Duration) (bool, error)
	Del(key string) error
	HealthCheck() error
}

func NewRedisCache

func NewRedisCache[T any](addr string, pwd string, db int, useTls bool) Cache[T]

Jump to

Keyboard shortcuts

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