cache

package
v1.9.26 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	PROVIDER_GO_CACHE = gocache.GO_CACHE
	PROVIDER_REDIS    = redis.REDIS
)
View Source
const (
	CACHE = "cache"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(ctx context.Context, key string, value any, options ...SetOption) error
	IncrBy(ctx context.Context, key string, value int64) (int64, error)
	Get(ctx context.Context, key string, value any) error
	Exist(ctx context.Context, key string) error
	Del(ctx context.Context, keys ...string) error
}

func C added in v1.9.25

func C() Cache

type PROVIDER added in v1.9.25

type PROVIDER string

type SetOption added in v1.9.21

type SetOption func(*options)

func WithExpiration added in v1.9.25

func WithExpiration(expiration int64) SetOption

Jump to

Keyboard shortcuts

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